Auto configure CharacterEncodingFilter

Provide a default UTF-8 encoding for HTTP requests and responses unless
specified otherwise.

Fixes gh-1182
This commit is contained in:
Stephane Nicoll
2014-11-11 11:57:36 +01:00
parent 6eab4628f4
commit 109c3a3439
8 changed files with 253 additions and 4 deletions

View File

@@ -93,6 +93,10 @@ content into your application; rather pick only the properties that you need.
spring.resources.cache-period= # cache timeouts in headers sent to browser
spring.resources.add-mappings=true # if default mappings should be added
# HTTP encoding ({sc-spring-boot-autoconfigure}/web/HttpEncodingProperties.{sc-ext}[HttpEncodingProperties])
spring.http.encoding=UTF-8 # the encoding of HTTP requests/responses
spring.http.force=true # force the configured encoding
# JACKSON ({sc-spring-boot-autoconfigure}}/jackson/JacksonProperties.{sc-ext}[JacksonProperties])
spring.jackson.date-format= # Date format string (e.g. yyyy-MM-dd HH:mm:ss), or a fully-qualified date format class name (e.g. com.fasterxml.jackson.databind.util.ISO8601DateFormat)
spring.jackson.property-naming-strategy= # One of the constants on Jackson's PropertyNamingStrategy (e.g. CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES) or the fully-qualified class name of a PropertyNamingStrategy subclass