File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
spring-kafka/src/main/java/org/springframework/kafka/support Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 4141 googleJsr305Version = ' 3.0.2'
4242 hamcrestVersion = ' 2.1'
4343 hibernateValidationVersion = ' 6.0.17.Final'
44- jacksonVersion = ' 2.9.9.20190807 '
44+ jacksonVersion = ' 2.10.0 '
4545 jaywayJsonPathVersion = ' 2.4.0'
4646 junit4Version = ' 4.12'
4747 junitJupiterVersion = ' 5.5.2'
Original file line number Diff line number Diff line change 2323import com .fasterxml .jackson .databind .MapperFeature ;
2424import com .fasterxml .jackson .databind .Module ;
2525import com .fasterxml .jackson .databind .ObjectMapper ;
26+ import com .fasterxml .jackson .databind .json .JsonMapper ;
2627
2728/**
2829 * The utilities for Jackson {@link ObjectMapper} instances.
@@ -54,9 +55,10 @@ public static ObjectMapper enhancedObjectMapper() {
5455 * @return the {@link ObjectMapper} instance.
5556 */
5657 public static ObjectMapper enhancedObjectMapper (ClassLoader classLoader ) {
57- ObjectMapper objectMapper = new ObjectMapper ();
58- objectMapper .configure (MapperFeature .DEFAULT_VIEW_INCLUSION , false );
59- objectMapper .configure (DeserializationFeature .FAIL_ON_UNKNOWN_PROPERTIES , false );
58+ ObjectMapper objectMapper = JsonMapper .builder ()
59+ .configure (MapperFeature .DEFAULT_VIEW_INCLUSION , false )
60+ .configure (DeserializationFeature .FAIL_ON_UNKNOWN_PROPERTIES , false )
61+ .build ();
6062 registerWellKnownModulesIfAvailable (objectMapper , classLoader );
6163 return objectMapper ;
6264 }
You can’t perform that action at this time.
0 commit comments