摘要:
DATE_FORMAT(time,'%Y-%m-%d %H:%i:%S') 阅读全文
摘要:
自上而下,向下抓层级树结构: 自下而上,向上抓层级树结构: 阅读全文
摘要:
System.getProperty("user.dir") 阅读全文
摘要:
代码如下: 阅读全文
摘要:
1.string 直接拼接 2.string.format 拼接 3.StringBuffer 拼接 4.StringBuilder 拼接 拼接字符串的速度:4 > 3 > 1 >2 总结:StringBuffer 是线程安全的,但是速度不如 StringBuilder。多个字符串尽量不要直接拼接, 阅读全文
摘要:
大家都知道simpleDateFormat是线程不安全的,所以java8中提供了更为方便的日期类型,以及线程安全的DateTimeFormatter日期格式化方法。代码如下: Instant date = Instant.now();//代替date System.out.println("inst 阅读全文
摘要:
//对数据做分组(分组条件:组织+对象) List<Map<String,Object>> list2 = new ArrayList<>(); Map<String,Object> map1 = new HashMap<>(); map1.put("organization", "北京"); ma 阅读全文
摘要:
1.第一种判断方式 <if test=' requisition != null and requisition == "Y" '> AND 表字段 = #{requisition}</if> 2.第二种判断方式 <if test=" requisition != null and requisit 阅读全文
摘要:
1.对BigDecimal类型的值求和 List<Map<String,Object>> list = new ArrayList<>(); Map<String,Object> stu1 = new HashMap<String, Object>(); stu1.put("name", "卫庄") 阅读全文
摘要:
List<String> lowCaseList = new ArrayList<>(); lowCaseList.add("dog"); lowCaseList.add("cat"); lowCaseList.add("tiger"); lowCaseList.add("lion"); List< 阅读全文