Allow Jackson’s time zone to be configured via the environment

This commit adds a new property, spring.jackson.time-zone, that can be
used to configure the time zone that Jackson uses when configuring
dates. It affects the serialisation of both JDK and Joda date types.

Closes gh-3505
This commit is contained in:
Andy Wilkinson
2015-07-15 14:34:58 +01:00
parent de95012635
commit b1e9139efe
4 changed files with 46 additions and 0 deletions

View File

@@ -179,6 +179,7 @@ content into your application; rather pick only the properties that you need.
spring.jackson.parser.*= # see Jackson's JsonParser.Feature
spring.jackson.serialization.*= # see Jackson's SerializationFeature
spring.jackson.serialization-inclusion= # Controls the inclusion of properties during serialization (see Jackson's JsonInclude.Include)
spring.jackson.time-zone # Time zone used when formatting dates. Configured using any recognized time zone identifier, for example "America/Los_Angeles" or "GMT+10"
# THYMELEAF ({sc-spring-boot-autoconfigure}/thymeleaf/ThymeleafAutoConfiguration.{sc-ext}[ThymeleafAutoConfiguration])
spring.thymeleaf.check-template-location=true