类 HttpMessageConverters
java.lang.Object
cn.taketoday.http.converter.HttpMessageConverters
- 所有已实现的接口:
Iterable<HttpMessageConverter<?>>
Bean used to manage the
HttpMessageConverters used in 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.
- 从以下版本开始:
- 4.0 2022/1/16 15:26
- 作者:
- Dave Syer, Phillip Webb, Andy Wilkinson, Harry Yang
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器构造器说明HttpMessageConverters(boolean addDefaultConverters, Collection<HttpMessageConverter<?>> converters) Create a newHttpMessageConvertersinstance with the specified converters.HttpMessageConverters(HttpMessageConverter<?>... additionalConverters) Create a newHttpMessageConvertersinstance with the specified additional converters.HttpMessageConverters(Collection<HttpMessageConverter<?>> additionalConverters) Create a newHttpMessageConvertersinstance with the specified additional converters. -
方法概要
修饰符和类型方法说明private voidconfigurePartConverters(AllEncompassingFormHttpMessageConverter formConverter, Collection<HttpMessageConverter<?>> converters) private List<HttpMessageConverter<?>>getCombinedConverters(Collection<HttpMessageConverter<?>> converters, List<HttpMessageConverter<?>> defaultConverters) Return an immutable list of the converters in the order that they will be registered.private List<HttpMessageConverter<?>>private booleanisReplacement(HttpMessageConverter<?> defaultConverter, HttpMessageConverter<?> candidate) 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.private voidreorderXmlConvertersToEnd(ArrayList<HttpMessageConverter<?>> converters) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 java.lang.Iterable
forEach, spliterator
-
字段详细资料
-
EQUIVALENT_CONVERTERS
-
converters
-
-
构造器详细资料
-
HttpMessageConverters
Create a newHttpMessageConvertersinstance 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 newHttpMessageConvertersinstance 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 newHttpMessageConvertersinstance 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.
-
-
方法详细资料
-
getCombinedConverters
private List<HttpMessageConverter<?>> getCombinedConverters(Collection<HttpMessageConverter<?>> converters, List<HttpMessageConverter<?>> defaultConverters) -
isReplacement
private boolean isReplacement(HttpMessageConverter<?> defaultConverter, HttpMessageConverter<?> candidate) -
configurePartConverters
private void configurePartConverters(AllEncompassingFormHttpMessageConverter formConverter, Collection<HttpMessageConverter<?>> converters) -
postProcessConverters
protected List<HttpMessageConverter<?>> postProcessConverters(List<HttpMessageConverter<?>> converters) Method that can be used to post-process theHttpMessageConverterlist 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 theHttpMessageConverterlist 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
-
getDefaultConverters
-
reorderXmlConvertersToEnd
-
iterator
- 指定者:
iterator在接口中Iterable<HttpMessageConverter<?>>
-
getConverters
Return an immutable list of the converters in the order that they will be registered.- 返回:
- the converters
-