类 HttpMessageConverters
java.lang.Object
org.springframework.boot.autoconfigure.http.HttpMessageConverters
- 所有已实现的接口:
Iterable<HttpMessageConverter<?>>
Bean used to manage the
HttpMessageConverter
s used in a Spring Boot
application. Provides a convenient way to add and merge additional
HttpMessageConverter
s 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.
- 从以下版本开始:
- 2.0.0
- 作者:
- Dave Syer, Phillip Webb, Andy Wilkinson
- 另请参阅:
-
构造器概要
构造器构造器说明HttpMessageConverters
(boolean addDefaultConverters, Collection<HttpMessageConverter<?>> converters) Create a newHttpMessageConverters
instance with the specified converters.HttpMessageConverters
(Collection<HttpMessageConverter<?>> additionalConverters) Create a newHttpMessageConverters
instance with the specified additional converters.HttpMessageConverters
(HttpMessageConverter<?>... additionalConverters) Create a newHttpMessageConverters
instance with the specified additional converters. -
方法概要
修饰符和类型方法说明Return 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 theHttpMessageConverter
list before it is used.protected List
<HttpMessageConverter<?>> postProcessPartConverters
(List<HttpMessageConverter<?>> converters) Method that can be used to post-process theHttpMessageConverter
list before it is used to configure the part converters ofAllEncompassingFormHttpMessageConverter
.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 java.lang.Iterable
forEach, spliterator
-
构造器详细资料
-
HttpMessageConverters
Create a newHttpMessageConverters
instance with the specified additional converters.- 参数:
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). ThepostProcessConverters(List)
method can be used for further converter manipulation.
-
HttpMessageConverters
Create a newHttpMessageConverters
instance with the specified additional converters.- 参数:
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). ThepostProcessConverters(List)
method can be used for further converter manipulation.
-
HttpMessageConverters
public HttpMessageConverters(boolean addDefaultConverters, Collection<HttpMessageConverter<?>> converters) Create a newHttpMessageConverters
instance with the specified converters.- 参数:
addDefaultConverters
- if default converters should be addedconverters
- 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). ThepostProcessConverters(List)
method can be used for further converter manipulation.
-
-
方法详细资料
-
postProcessConverters
protected List<HttpMessageConverter<?>> postProcessConverters(List<HttpMessageConverter<?>> converters) Method that can be used to post-process theHttpMessageConverter
list before it is used.- 参数:
converters
- a mutable list of the converters that will be used.- 返回:
- the final converts list to use
-
postProcessPartConverters
protected List<HttpMessageConverter<?>> postProcessPartConverters(List<HttpMessageConverter<?>> converters) Method that can be used to post-process theHttpMessageConverter
list before it is used to configure the part converters ofAllEncompassingFormHttpMessageConverter
.- 参数:
converters
- a mutable list of the converters that will be used.- 返回:
- the final converts list to use
- 从以下版本开始:
- 1.3.0
-
iterator
- 指定者:
iterator
在接口中Iterable<HttpMessageConverter<?>>
-
getConverters
Return an immutable list of the converters in the order that they will be registered.- 返回:
- the converters
-