Class HttpMessageConverters
java.lang.Object
org.springframework.boot.autoconfigure.http.HttpMessageConverters
- All Implemented Interfaces:
- Iterable<HttpMessageConverter<?>>
Bean used to manage the 
HttpMessageConverters used in a Spring Boot
 application. Provides a convenient way to add and merge additional
 HttpMessageConverters to a web application.
 
 An instance of this bean can be registered with specific
 additional converters if
 needed, otherwise default converters will be used.
 
 NOTE: The default converters used are the same as standard Spring MVC (see
 WebMvcConfigurationSupport) with some slight re-ordering to put XML converters
 at the back of the list.
- Since:
- 2.0.0
- Author:
- Dave Syer, Phillip Webb, Andy Wilkinson
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionHttpMessageConverters(boolean addDefaultConverters, Collection<HttpMessageConverter<?>> converters) Create a newHttpMessageConvertersinstance with the specified converters.HttpMessageConverters(Collection<HttpMessageConverter<?>> additionalConverters) Create a newHttpMessageConvertersinstance with the specified additional converters.HttpMessageConverters(HttpMessageConverter<?>... additionalConverters) Create a newHttpMessageConvertersinstance with the specified additional converters.
- 
Method SummaryModifier and TypeMethodDescriptionReturn an immutable list of the converters in the order that they will be registered.iterator()protected List<HttpMessageConverter<?>>postProcessConverters(List<HttpMessageConverter<?>> converters) Method that can be used to post-process theHttpMessageConverterlist before it is used.protected List<HttpMessageConverter<?>>postProcessPartConverters(List<HttpMessageConverter<?>> converters) Method that can be used to post-process theHttpMessageConverterlist before it is used to configure the part converters ofAllEncompassingFormHttpMessageConverter.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Constructor Details- 
HttpMessageConvertersCreate a newHttpMessageConvertersinstance with the specified additional converters.- Parameters:
- additionalConverters- additional converters to be added. Items are added just before any default converter of the same type (or at the front of the list if no default converter is found). The- postProcessConverters(List)method can be used for further converter manipulation.
 
- 
HttpMessageConvertersCreate a newHttpMessageConvertersinstance with the specified additional converters.- Parameters:
- additionalConverters- additional converters to be added. Items are added just before any default converter of the same type (or at the front of the list if no default converter is found). The- postProcessConverters(List)method can be used for further converter manipulation.
 
- 
HttpMessageConverterspublic HttpMessageConverters(boolean addDefaultConverters, Collection<HttpMessageConverter<?>> converters) Create a newHttpMessageConvertersinstance with the specified converters.- Parameters:
- addDefaultConverters- if default converters should be added
- converters- converters to be added. Items are added just before any default converter of the same type (or at the front of the list if no default converter is found). The- postProcessConverters(List)method can be used for further converter manipulation.
 
 
- 
- 
Method Details- 
postProcessConvertersprotected List<HttpMessageConverter<?>> postProcessConverters(List<HttpMessageConverter<?>> converters) Method that can be used to post-process theHttpMessageConverterlist before it is used.- Parameters:
- converters- a mutable list of the converters that will be used.
- Returns:
- the final converts list to use
 
- 
postProcessPartConvertersprotected List<HttpMessageConverter<?>> postProcessPartConverters(List<HttpMessageConverter<?>> converters) Method that can be used to post-process theHttpMessageConverterlist before it is used to configure the part converters ofAllEncompassingFormHttpMessageConverter.- Parameters:
- converters- a mutable list of the converters that will be used.
- Returns:
- the final converts list to use
- Since:
- 1.3.0
 
- 
iterator- Specified by:
- iteratorin interface- Iterable<HttpMessageConverter<?>>
 
- 
getConvertersReturn an immutable list of the converters in the order that they will be registered.- Returns:
- the converters
 
 
-