Allow Jackson's serialization inclusion to be configured via the env
This commit adds support for configuring an ObjectMapper's serialization inclusion using the environment via the spring.jackson.serialization-inclusion property. The property's value should be one of the values on the JsonInclude.Include enumeration. Relaxed binding of the property value to the enum is supported. For example: spring.jackson.serialization-inclusion: non_null Closes gh-2532
This commit is contained in:
@@ -142,6 +142,7 @@ content into your application; rather pick only the properties that you need.
|
||||
spring.jackson.mapper.*= # see Jackson's MapperFeature
|
||||
spring.jackson.parser.*= # see Jackson's JsonParser.Feature
|
||||
spring.jackson.serialization.*= # see Jackson's SerializationFeature
|
||||
spring.jackson.serialization-inclusion= # Controls the inclusion of properties during serialization (see Jackson's JsonInclude.Include)
|
||||
|
||||
# THYMELEAF ({sc-spring-boot-autoconfigure}/thymeleaf/ThymeleafAutoConfiguration.{sc-ext}[ThymeleafAutoConfiguration])
|
||||
spring.thymeleaf.check-template-location=true
|
||||
|
||||
Reference in New Issue
Block a user