Use Jackson ObjectMapper improved default properties outside spring-web [SPR-12293] #16898
Labels
in: messaging
Issues in messaging modules (jms, messaging)
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Sébastien Deleuze opened SPR-12293 and commented
It could be interesting to have an
ObjectMapper
builder outsidespring-web
andspring-webmvc
modules (for example in messaging) in order to have the same Jackson default settings everywhere in Spring Framework. It is currently not directly possible sinceJackson2ObjectMapperBuilder
is inspring-web
module.Perhaps something to consider if we support in the future
@JsonView
in@MessageMapping
annotated handler methods.Another solution (even if less clean) could be to configure the same properties (
DEFAULT_VIEW_INCLUSION
andFAIL_ON_UNKNOWN_PROPERTIES
to false) directly with theObjectMapper
instances inorg.springframework.messaging.converter.MappingJackson2MessageConverter
andorg.springframework.jms.support.converter.MappingJackson2MessageConverter
constructors.Affects: 4.1.1
The text was updated successfully, but these errors were encountered: