Provide fine-grained configuration support for HTTP message converters created in WebMvcConfigurationSupport#addDefaultHttpMessageConverters [SPR-17218] #21751
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: declined
A suggestion or change that we don't feel we should currently apply
type: enhancement
A general enhancement
lgoldstein opened SPR-17218 and commented
The current code creates and initializes said converters without providing the user any way to intervene and modify the defaults. E.g., provide some external
ObjectMapper
to theMappingJackson2HttpMessageConverter
, modify the default charset ofStringHttpMessageConverter
etc... The only recourse currently available is to overrideextendMessageConverters
, somehow detect the converter(s) of interest and re-initialize them - potentially repeating already existing code (a.k.a. the D.R.Y. principle). I propose the following (IMO simple) feature - add apreConfigureDefaultHttpMessageConverter
method that allows users to re-configure the initial converter - e.g.:Affects: 5.0.8
The text was updated successfully, but these errors were encountered: