You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note use of this method turns off default converter registration. Alternatively, use extendMessageConverters(java.util.List) to modify that default list of converters.
This does not seem to be the case. My expectation from the documentation is that if I defined this override, my application will just use the converters I register manually there. However, if I inspect the list it contains the default converters. I can clear the list but the behaviour doesn't seem to match the documentation.
I have attached a simple application that shows the issue (test.zip).
The text was updated successfully, but these errors were encountered:
joca-bt
changed the title
configureMessageConverters of WebMvcConfigurer does not strictly to what is documented
configureMessageConverters of WebMvcConfigurer does not strictly do what is documented
May 24, 2023
configureMessageConverters works as documented if used on its own. However, in a Boot application, the WebMvcAutoConfiguration adds message converters through its HttpMessageConverters mechanism, which by default includes any HttpMessageConverter beans, and default converters. So the way to customize this in a Boot application is through HttpMessageConverters, or use the extendMessageConverters which lets you customize the resulting list at the end.
I'll update the Javadoc to at least mention this, but aside from that it's expected behavior.
For future reference, please provide a Maven or Gradle configured sample. You can use https://start.spring.io/.
rstoyanchev
changed the title
configureMessageConverters of WebMvcConfigurer does not strictly do what is documented
Update Javadoc and reference doc for WebMvcConfigurer to mention Boots HttpMessageConvertersof configureMessageConverters in to qualify
May 30, 2023
rstoyanchev
changed the title
Update Javadoc and reference doc for WebMvcConfigurer to mention Boots HttpMessageConvertersof configureMessageConverters in to qualify
Update Javadoc and reference doc for WebMvcConfigurer to mention Boots HttpMessageConverters
May 30, 2023
rstoyanchev
changed the title
Update Javadoc and reference doc for WebMvcConfigurer to mention Boots HttpMessageConverters
Update Javadoc and reference doc for WebMvcConfigurer to mention Boot's HttpMessageConverters
May 30, 2023
The documentation for
configureMessageConverters
states:This does not seem to be the case. My expectation from the documentation is that if I defined this override, my application will just use the converters I register manually there. However, if I inspect the list it contains the default converters. I can clear the list but the behaviour doesn't seem to match the documentation.
I have attached a simple application that shows the issue (test.zip).
The text was updated successfully, but these errors were encountered: