• Dave Syer's avatar
    Support for @Beans of type HttpMessageConverter, and Jackson specific details · c2b499c7
    Dave Syer authored
    You can contribute additional HttpMessageConverters
    by simply adding beans of that type in a Spring Boot
    context. If a bean you add is of a type that would have been included
    by default anyway (like MappingJackson2HttpMessageConverter for JSON
    conversions) then it will replace the default value. A convenience
    bean is provided of type MessageConverters (always available if you
    use the default MVC configuration) which has some useful methods to
    access the default and user-enhanced message converters (useful, for
    example if you want to manually inject them into a custom
    RestTemplate).
    
    There are also some convenient configuration shortcuts for Jackson2.
    The smallest change that might work is to just add beans of type
    Module to your context. They will be registered with the default
    ObjectMapper and then injected into the default message
    converter. In addition, if your context contains any beans of type
    ObjectMapper then all of the Module beans will be registered with
    all of the mappers.
    c2b499c7
pom.xml 6.5 KB