Commit 842afa4 1 parent 42ad6dd commit 842afa4 Copy full SHA for 842afa4
File tree 2 files changed +4
-2
lines changed
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jackson
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ checkstyleToolVersion=10.12.4
11
11
commonsCodecVersion =1.17.1
12
12
graalVersion =22.3
13
13
hamcrestVersion =2.2
14
- jacksonVersion =2.17.2
14
+ jacksonVersion =2.18.0
15
15
javaFormatVersion =0.0.43
16
16
junitJupiterVersion =5.11.0
17
17
kotlinVersion =1.9.25
Original file line number Diff line number Diff line change 49
49
import com .fasterxml .jackson .databind .cfg .JsonNodeFeature ;
50
50
import com .fasterxml .jackson .databind .exc .InvalidFormatException ;
51
51
import com .fasterxml .jackson .databind .module .SimpleModule ;
52
+ import com .fasterxml .jackson .databind .ser .DefaultSerializerProvider ;
52
53
import com .fasterxml .jackson .databind .util .StdDateFormat ;
53
54
import com .fasterxml .jackson .module .paramnames .ParameterNamesModule ;
54
55
import org .assertj .core .api .InstanceOfAssertFactories ;
@@ -318,7 +319,8 @@ void moduleBeansAndWellKnownModulesAreRegisteredWithTheObjectMapperBuilder() {
318
319
this .contextRunner .withUserConfiguration (ModuleConfig .class ).run ((context ) -> {
319
320
ObjectMapper objectMapper = context .getBean (Jackson2ObjectMapperBuilder .class ).build ();
320
321
assertThat (context .getBean (CustomModule .class ).getOwners ()).contains (objectMapper );
321
- assertThat (objectMapper .canSerialize (Baz .class )).isTrue ();
322
+ assertThat (((DefaultSerializerProvider ) objectMapper .getSerializerProviderInstance ())
323
+ .hasSerializerFor (Baz .class , null )).isTrue ();
322
324
});
323
325
}
324
326
You can’t perform that action at this time.
0 commit comments