spring-bootspring-boot-actuator

Response MIME type for Spring Boot actuator endpoints


I have updated a Spring Boot application from 1.4.x to 1.5.1 and the Spring Actuator endpoints return a different MIME type now:

For example, /health is now application/vnd.spring-boot.actuator.v1+json instead simply application/json.

How can I change this back?


Solution

  • The endpoints return a content type that honours what the client's request says it can accept. You will get an application/json response if the client send an Accept header that asks for it:

    Accept: application/json