Apply HATEOAS module to primary ObjectMapper
Update HypermediaAutoConfiguration to apply the Jackson2HalModule to the primary ObjectMapper. This restores the behavior of Spring Boot 1.1 where HATEOAS types could be serialized for both `application/json` and `application/json+hal` content types. A `spring.hateoas.apply-to-primary-object-mapper` property has also been provided to opt-out if necessary. Fixes gh-2147
This commit is contained in:
@@ -96,6 +96,9 @@ 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
|
||||
|
||||
# SPRING HATEOS ({sc-spring-boot-autoconfigure}/hateoas/HateoasProperties.{sc-ext}[HateoasProperties])
|
||||
spring.hateoas.apply-to-primary-object-mapper=true # if the primary mapper should also be configured
|
||||
|
||||
# HTTP encoding ({sc-spring-boot-autoconfigure}/web/HttpEncodingProperties.{sc-ext}[HttpEncodingProperties])
|
||||
spring.http.encoding.charset=UTF-8 # the encoding of HTTP requests/responses
|
||||
spring.http.encoding.enabled=true # enable http encoding support
|
||||
|
||||
Reference in New Issue
Block a user