Skip to content

Commit f51b304

Browse files
nicoglpwilkinsona
authored andcommitted
Update JackonAutoConfiguration to apply all http.mappers properties
Previously, only the http.mappers.json-sort-keys property was applied by JacksonAutoConfiguration. This commit updates it to also apply the http.mappers.json-pretty-print property as well. See spring-projects#1919
1 parent 33dfab0 commit f51b304

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ public ObjectMapper jacksonObjectMapper() {
9090
objectMapper.configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS,
9191
true);
9292
}
93+
if (this.properties.isJsonPrettyPrint()) {
94+
objectMapper.configure(SerializationFeature.INDENT_OUTPUT, true);
95+
}
9396
return objectMapper;
9497
}
9598

0 commit comments

Comments
 (0)