• Brian Clozel's avatar
    Add actuator specific ObjectMapper · 97af0b2f
    Brian Clozel authored
    Prior to this commit, Actuator endpoints would use the application
    ObjectMapper instance for serializing payloads as JSON. This was
    problematic in several cases:
    
    * application-specific configuration would change the actuator endpoint
    output.
    * choosing a different JSON mapper implementation in the application
    would break completely some endpoints.
    
    Spring Boot Actuator already has a hard dependency on Jackson, and this
    commit uses that fact to configure a shared `ObjectMapper` instance that
    will be used by the Actuator infrastructure consistently, without
    polluting the application context.
    
    This `ObjectMapper` is used in Actuator for:
    
    * JMX endpoints
    * Spring MVC endpoints with an HTTP message converter
    * Spring WebFlux endpoints with an `Encoder`
    * Jersey endpoints with a `ContextResolver<ObjectMapper>`
    
    For all web endpoints, this configuration is limited to the
    actuator-specific media types such as
    `"application/vnd.spring-boot.actuator.v3+json"`.
    
    Fixes gh-12951
    97af0b2f
Name
Last commit
Last update
.github Loading commit data...
buildSrc Loading commit data...
ci Loading commit data...
eclipse Loading commit data...
git/hooks Loading commit data...
gradle/wrapper Loading commit data...
idea Loading commit data...
spring-boot-project Loading commit data...
spring-boot-tests Loading commit data...
src/checkstyle Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
SUPPORT.adoc Loading commit data...
build.gradle Loading commit data...
gradle.properties Loading commit data...
gradlew Loading commit data...
gradlew.bat Loading commit data...
settings.gradle Loading commit data...