mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
af026c0373
Prior to this commit, the `HttpMessageConverters` builder API had methods like "jsonMessageConverter" for configuring a specific converter for JSON support. This converter would be always configured at a given position, even if default converters registration is not requested. On the other hand, `customMessageConverter` would add any converter ahead of the list, in all cases. This difference was not conveyed as it should by the API. This commit makes the following changes: * builder methods are renamed to `withJsonConverter` and variants, to better convey the fact that those are replacing the default converter for a given format. * `customMessageConverter` is renamed to `addCustomConverter` to better reflect the additive aspect. * the JavaDoc has been updated accordingly * `withJsonConverter` and others are now only effective if the default registration of auto-detected converters is requested. This better aligns with the behavior in the reactive codecs configuration Closes gh-35704