随笔分类 - String字符串
摘要:String version = "V"+localDate7.getYear()+ (localDate7.getMonthValue()>10?localDate7.getMonthValue():"0"+localDate7.getMonthValue());
阅读全文
摘要:雪花算法id在json时后几位被置零 增加@JsonSerialize(using= ToStringSerializer.class)注解 ```import com.fasterxml.jackson.databind.annotation.JsonSerialize;import com.fa
阅读全文
摘要:下滑线和驼峰之间转换 String key = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,key)//驼峰转下划线 String key = CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWE
阅读全文
摘要:匹配纯字符,思路:字符串不能包含数字,字母和中文 String.matches() 匹配方法 String str = "..."; System.out.println(!str.matches(".*[a-z0-9A-Z\\u4e00-\\u9fa5]+.*")); Pattern.compil
阅读全文