Rework server.servlet.encoding properties to clarify when they apply #45394
Labels
theme: structure
Issues related to the structure of the project and its code
type: enhancement
A general enhancement
Milestone
Uh oh!
There was an error while loading. Please reload this page.
server.servlet.encoding.force
,server.servlet.encoding.force-request
,server.servlet.encoding.force-response
HttpEncodingAutoConfiguration
applies them to auto-configuredCharacterEncodingFilter
server.servlet.encoding.charset
HttpMessageConvertersAutoConfiguration
applies it to auto-configuredStringHttpMessageConverter
String
s during blocking HTTP exchanges (Spring MVC,RestTemplate
,RestClient
)HttpEncodingAutoConfiguration
applies it to auto-configuredCharacterEncodingFilter
server.servlet.encoding.mapping
HttpEncodingAutoConfiguration
applies it toConfigurableServletWebServerFactory
Prior to #18827, properties were all named
spring.http.encoding.*.
.I think we need to move to somewhere between the two extremes, perhaps the following:
I'm unsure about both
spring.servlet.encoding.charset
andspring.http.converters.string-encoding-charset
. The former should be applied to the auto-configuredCharacterEncodingFilter
that applies to all servlet web apps. The latter would be applied to the auto-configuredStringHttpMessageConverter
that applies to any blocking HTTP exchange using Spring MVC, RestTemplate, or RestClient. Having two properties that will have the same value the vast majority of the time is not ideal.The text was updated successfully, but these errors were encountered: