05 2024 档案

摘要:实现RuntimeHintsRegistrar接口,再用hints添加要注册的类型。 eg: @Configuration @ImportRuntimeHints(MyRuntimeHintsRegistrar.class) public class MyRuntimeHintsRegistrar 阅读全文
posted @ 2024-05-31 16:39 漠孤烟 阅读(88) 评论(0) 推荐(0) 编辑
摘要:枚举脱敏字段类型及规则 import java.util.function.Function; public enum TextMaskStrategy { ID_NO("身份证", 18, text -> "*".repeat(text.length() - 4) + text.substring 阅读全文
posted @ 2024-05-30 14:23 漠孤烟 阅读(99) 评论(0) 推荐(0) 编辑
摘要:原因:输出的字符集与源文件字符集不一致 如果源文件为UTF-8 先运行字符集修改命令 chcp 65001 再执行既有命令 2、如果源文件为GB2312/GBK 先运行字符集修改命令 chcp 936 再执行命令 3、如果源文件为BIG5 先运行字符集修改命令 chcp 950 再执行命令 拓展:c 阅读全文
posted @ 2024-05-28 17:49 漠孤烟 阅读(1211) 评论(0) 推荐(0) 编辑
摘要:httpServer.createContext("/abc", SimpleFileServer.createFileHandler(Path.of("D:\\my-abc"))); httpServer.createContext("/def", SimpleFileServer.createF 阅读全文
posted @ 2024-05-21 11:19 漠孤烟 阅读(31) 评论(0) 推荐(0) 编辑
摘要:方法:重写MessageConverter, 使得yyyy-MM-dd HH:mm:ss的字符串能反序列化到LocalDateTime类型上。 @Configuration public class HttpClientConfig { @Value("${service.host}") priva 阅读全文
posted @ 2024-05-17 17:06 漠孤烟 阅读(84) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示