06 2023 档案
摘要:1.线程池+countDownLatch+时间的测试 1.1 使用目的说明 下面代码的目的是当SimpleDateFormat 多线程调用的情况下,被用作为全局变量的时候会出现线程不安全的情况 解决的方法是:可以通过使用局部变量或者利用java中自带的线程安全时间工具类LocalDateTime /
阅读全文
摘要:1.日期处理 1.1 引入必要依赖:版本5.3.8 <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> <version>${hutool.version}</version> </depende
阅读全文
摘要:1.本地缓存实现 1.1导入依赖 <!-- caffeine 缓存 --> <dependency> <groupId>com.github.ben-manes.caffeine</groupId> <artifactId>caffeine</artifactId> </dependency> 1.
阅读全文