Interface HttpMessageConverters.Builder<T extends HttpMessageConverters.Builder<T>>
- All Known Subinterfaces:
HttpMessageConverters.ClientBuilder, HttpMessageConverters.ServerBuilder
- Enclosing interface:
HttpMessageConverters
public static interface HttpMessageConverters.Builder<T extends HttpMessageConverters.Builder<T>>
- Since:
- 7.0
- Author:
- Brian Clozel
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build and return theHttpMessageConvertersinstance configured by this builder.cborMessageConverter(HttpMessageConverter<?> cborMessageConverter) Override the default Jackson 3.x CBORHttpMessageConverterwith any converter supporting the CBOR format.configureMessageConverters(Consumer<HttpMessageConverter<?>> configurer) Add a consumer for configuring the selected message converters.customMessageConverter(HttpMessageConverter<?> customConverter) Add a customHttpMessageConverterto the list of converters.jsonMessageConverter(HttpMessageConverter<?> jsonMessageConverter) Override the default Jackson 3.x JSONHttpMessageConverterwith any converter supporting the JSON format.Register default converters using classpath detection.smileMessageConverter(HttpMessageConverter<?> smileMessageConverter) Override the default Jackson 3.x SmileHttpMessageConverterwith any converter supporting the Smile format.stringMessageConverter(HttpMessageConverter<?> stringMessageConverter) Override the default StringHttpMessageConverterwith any converter supporting String conversion.xmlMessageConverter(HttpMessageConverter<?> xmlMessageConverter) Override the default Jackson 3.x XMLHttpMessageConverterwith any converter supporting the XML format.yamlMessageConverter(HttpMessageConverter<?> yamlMessageConverter) Override the default Jackson 3.x YamlHttpMessageConverterwith any converter supporting the Yaml format.
-
Method Details
-
registerDefaults
T registerDefaults()Register default converters using classpath detection. Manual registrations likejsonMessageConverter(HttpMessageConverter)will override auto-detected ones. -
stringMessageConverter
Override the default StringHttpMessageConverterwith any converter supporting String conversion.- Parameters:
stringMessageConverter- the converter instance to use- See Also:
-
jsonMessageConverter
Override the default Jackson 3.x JSONHttpMessageConverterwith any converter supporting the JSON format.- Parameters:
jsonMessageConverter- the converter instance to use- See Also:
-
xmlMessageConverter
Override the default Jackson 3.x XMLHttpMessageConverterwith any converter supporting the XML format.- Parameters:
xmlMessageConverter- the converter instance to use- See Also:
-
smileMessageConverter
Override the default Jackson 3.x SmileHttpMessageConverterwith any converter supporting the Smile format.- Parameters:
smileMessageConverter- the converter instance to use- See Also:
-
cborMessageConverter
Override the default Jackson 3.x CBORHttpMessageConverterwith any converter supporting the CBOR format.- Parameters:
cborMessageConverter- the converter instance to use- See Also:
-
yamlMessageConverter
Override the default Jackson 3.x YamlHttpMessageConverterwith any converter supporting the Yaml format.- Parameters:
yamlMessageConverter- the converter instance to use- See Also:
-
customMessageConverter
Add a customHttpMessageConverterto the list of converters.- Parameters:
customConverter- the converter instance to add
-
configureMessageConverters
Add a consumer for configuring the selected message converters.- Parameters:
configurer- the configurer to use
-
build
HttpMessageConverters build()Build and return theHttpMessageConvertersinstance configured by this builder.
-