We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e0f9e4 commit a21a0feCopy full SHA for a21a0fe
1 file changed
common/core/src/main/java/top/cadecode/uniboot/common/core/util/JacksonUtil.java
@@ -27,7 +27,7 @@
27
@Component
28
public class JacksonUtil implements InitializingBean {
29
30
- public static ObjectMapper OBJECT_MAPPER;
+ private static ObjectMapper OBJECT_MAPPER;
31
32
private ObjectMapper objectMapper;
33
@@ -39,6 +39,10 @@ public void setObjectMapper(ObjectMapper objectMapper) {
39
this.objectMapper = objectMapper;
40
}
41
42
+ public static ObjectMapper getMapper() {
43
+ return OBJECT_MAPPER;
44
+ }
45
+
46
/**
47
* 转换对象到 json 串
48
*
0 commit comments