Open
Description
server.servlet.encoding.force
,server.servlet.encoding.force-request
,server.servlet.encoding.force-response
HttpEncodingAutoConfiguration
applies them to auto-configuredCharacterEncodingFilter
- affects any servlet web app, not just an embedded web server
server.servlet.encoding.charset
HttpMessageConvertersAutoConfiguration
applies it to auto-configuredStringHttpMessageConverter
- affects reading or writing of
String
s during blocking HTTP exchanges (Spring MVC,RestTemplate
,RestClient
)
- affects reading or writing of
HttpEncodingAutoConfiguration
applies it to auto-configuredCharacterEncodingFilter
- affects any servlet web app, not just an embedded web server
server.servlet.encoding.mapping
HttpEncodingAutoConfiguration
applies it toConfigurableServletWebServerFactory
- affects servlet web apps using an embedded web server
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:
spring.servlet.encoding.charset
spring.servlet.encoding.force
spring.servlet.encoding.force-request
spring.servlet.encoding.force-response
spring.http.converters.string-encoding-charset
server.servlet.encoding.mapping
I'm unsure about both spring.servlet.encoding.charset
and spring.http.converters.string-encoding-charset
. The former should be applied to the auto-configured CharacterEncodingFilter
that applies to all servlet web apps. The latter would be applied to the auto-configured StringHttpMessageConverter
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.