fix: 修复JsonUtils默认配置覆盖问题

pull/170/head
jackie 2025-02-21 15:46:21 +08:00
parent 708c5eb834
commit 775d8c7bc4
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,8 @@ public class JsonUtils {
// 静态初始化块,确保默认配置和模块注册
static {
configureDefaultSettings(objectMapper);
objectMapper.registerModule(new SimpleModule()); // 默认初始化时注册 SimpleModule
// 解决 LocalDateTime 的序列化
objectMapper.registerModule(new JavaTimeModule());
}
/**