You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disable Jackson SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS by default
Jackson added a breaking change in 2.10 for the way Duration is serialized.
Before that the DurationSerializer was using SerializationFeature.WRITE_DATES_AS_TIMESTAMPS
to check whether Duration should be serialized as a timestamp or not.
Since 2.10 Jackson uses SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS
to check whether Duration should be serialized as a timestamp or not.
This commit aligns the default for SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS
with the default for SerializationFeature.WRITE_DATES_AS_TIMESTAMPS
The change in Jackson was done in FasterXML/jackson-modules-java8#75fixesspring-projectsgh-19345
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration.java
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,7 @@ public class JacksonAutoConfiguration {
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfigurationTests.java
0 commit comments