mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-04-05 10:13:16 +08:00
update 优化 统一补全代码注释
This commit is contained in:
@@ -28,6 +28,11 @@ import java.util.TimeZone;
|
||||
@AutoConfiguration(before = JacksonAutoConfiguration.class)
|
||||
public class JacksonConfig {
|
||||
|
||||
/**
|
||||
* 注册 Jackson 序列化与反序列化模块。
|
||||
*
|
||||
* @return Jackson 模块
|
||||
*/
|
||||
@Bean
|
||||
public SimpleModule registerJavaTimeModule() {
|
||||
// 全局配置序列化返回 JSON 处理
|
||||
@@ -43,6 +48,11 @@ public class JacksonConfig {
|
||||
return module;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化 Jackson 构建器默认配置。
|
||||
*
|
||||
* @return Jackson 构建器自定义器
|
||||
*/
|
||||
@Bean
|
||||
public JsonMapperBuilderCustomizer jsonInitCustomizer() {
|
||||
return builder -> {
|
||||
|
||||
@@ -24,6 +24,11 @@ public class JsonUtils {
|
||||
|
||||
private static final JsonMapper JSON_MAPPER = SpringUtils.getBean(JsonMapper.class);
|
||||
|
||||
/**
|
||||
* 获取全局 JsonMapper 实例。
|
||||
*
|
||||
* @return JsonMapper
|
||||
*/
|
||||
public static JsonMapper getJsonMapper() {
|
||||
return JSON_MAPPER;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user