Response MIME type for Spring Boot actuator endpoints

kap picture kap · Feb 20, 2017 · Viewed 9.9k times · Source

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?

Answer

Andy Wilkinson picture Andy Wilkinson · Feb 20, 2017

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