You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
c2b499c775
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. |
11 years ago | |
---|---|---|
.. | ||
SCRAPBOOK.md | 11 years ago | |
application.yml | 11 years ago | |
howto.md | 11 years ago |