Skip to content

Commit a21a0fe

Browse files
committed
refactor: 添加方法 getMapper()
1 parent 6e0f9e4 commit a21a0fe

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

common/core/src/main/java/top/cadecode/uniboot/common/core/util/JacksonUtil.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@Component
2828
public class JacksonUtil implements InitializingBean {
2929

30-
public static ObjectMapper OBJECT_MAPPER;
30+
private static ObjectMapper OBJECT_MAPPER;
3131

3232
private ObjectMapper objectMapper;
3333

@@ -39,6 +39,10 @@ public void setObjectMapper(ObjectMapper objectMapper) {
3939
this.objectMapper = objectMapper;
4040
}
4141

42+
public static ObjectMapper getMapper() {
43+
return OBJECT_MAPPER;
44+
}
45+
4246
/**
4347
* 转换对象到 json 串
4448
*

0 commit comments

Comments
 (0)