ICode9

精准搜索请尝试: 精确搜索
  • spring boot validation 两个值中必须有一个不为空2022-08-12 19:04:57

    @javax.validation.constraints.AssertTrue public class MyModel { private String value1; private String value2; @AssertTrue(message = "Values are invalid") private boolean isValid() { return value1 != null || value2

  • redis-06 五大基本类型之Set2021-10-05 23:33:22

    redis-06 五大基本类型之Set 目录redis-06 五大基本类型之Set概述命令增、删、查、判断是否存在集合运算差交并集合其它操作实践文章标签 概述 Redis 中的集合最多存储 232 - 1 个元素,具备固有集合的性质(唯一性、无序性),Redis 中的集合是通过 Hash Table 数据结构实现的,增删查的时

  • 易错总结:String 定义的那些字符串之间的比较2021-01-03 16:30:19

    你是不是经常在做题的时候,会遇到这种类型的题: String s1 = “hello”; String s2 = “hel” + “lo”; Assert.assertTrue(s1 == s2); 但是你又对 String 的定义不是那么的清晰 小伙伴们,你们的福利来了,下面我将为你详细叙述: 1、字符串在内存中的分配: 2、代码中见实效: // tru

  • Java 常用验证方法(commons-validator,hutool)2020-08-30 02:31:35

    背景 为了实现接口响应全量字段断言,开发断言表达式框架时,除了调研常用的断言框架之外,也调研了一些验证框架和方法(非hibernate-validator、spring-validator验证注解)。 简单学习下构建工具Gradle如何使用。 commons-validator A common issue when receiving data either electron

  • unittest中的断言方法2019-11-01 16:55:20

    方法        用途 assertEqual(a,b)      a=b assertNotEqual(a,b)    a!=b assertTrue(x)     x为True assertFals(x)  x为False                assertIn(item,list) item在list中       assertNotIn(item,list) item不在list中 

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有