Merge branch '3.2.x'

Closes gh-40839
This commit is contained in:
Andy Wilkinson
2024-05-20 15:55:16 +01:00
2 changed files with 7 additions and 3 deletions

View File

@@ -91,12 +91,15 @@ Sensible defaults are included out of the box.
For example, objects can be automatically converted to JSON (by using the Jackson library) or XML (by using the Jackson XML extension, if available, or by using JAXB if the Jackson XML extension is not available).
By default, strings are encoded in `UTF-8`.
Any `HttpMessageConverter` bean that is present in the context is added to the list of converters.
You can also override default converters in the same way.
If you need to add or customize converters, you can use Spring Boot's `HttpMessageConverters` class, as shown in the following listing:
include-code::MyHttpMessageConvertersConfiguration[]
Any `HttpMessageConverter` bean that is present in the context is added to the list of converters.
You can also override default converters in the same way.
For further control, you can also sub-class `HttpMessageConverters` and override its `postProcessConverters` and/or `postProcessPartConverters` methods.
This can be useful when you want to re-order or remove some of the converters that Spring MVC configures by default.