随笔分类 -  Java

Java相关
摘要:String字符串拼接的各种方式 阅读全文
posted @ 2021-08-12 09:32 XuTingYin 阅读(480) 评论(0) 推荐(0)
摘要:#Optional 相关操作 Stream 相关操作 1、List 转Map<Integer,String> Map<Integer,String> roadMap = dtoList.stream().collect(Collectors.toMap(MaintPlanBaseDTO::getId 阅读全文
posted @ 2021-06-22 11:07 XuTingYin 阅读(79) 评论(0) 推荐(0)
摘要:业务场景:在启动项目的时候,报错! BeanCurrentlyInCreationException: Error creating bean with name 'MaintPlanService': Requested bean is currently in creation: Is ther 阅读全文
posted @ 2021-05-23 13:43 XuTingYin 阅读(698) 评论(0) 推荐(0)
摘要:场景 在项目中,定义了一个 Integer 类型的DEFAULT_VALUE 默认值,但在查询学生数量时,定义的是Long类型,在使用equals比较相等时,与预期不符合 public class LongAndInteger { private final static Integer DEFAU 阅读全文
posted @ 2021-03-31 14:23 XuTingYin 阅读(557) 评论(0) 推荐(0)
摘要:查看编译生成的汇编代码 1、下载动态链接库 hsdis-amd64.dl hsdis-amd64.lib 2、将这两个文件放到%JAVA_HOME%/jre/bin/server目录下 3、在需要查看汇编代码的类启动时加上如下参数 -XX:+UnlockDiagnosticVMOptions -XX 阅读全文
posted @ 2021-01-27 10:12 XuTingYin 阅读(449) 评论(0) 推荐(0)
摘要:BigDecimal 各种保留的区别 public class Test { public static void main(String[] args) { BigDecimal b1 = new BigDecimal(String.valueOf(2.3555)); // 2.4 ROUND_U 阅读全文
posted @ 2021-01-21 17:23 XuTingYin 阅读(211) 评论(0) 推荐(0)