我已将 Spring Boot 应用程序从 1.4.x 更新到 1.5.1,并且 Spring Actuator 端点现在返回不同的 MIME 类型:
例如,/health
现在是 application/vnd.spring-boot.actuator.v1+json
而是简单地application/json
.
我怎样才能把它改回来?
请您参考如下方法:
端点返回一个内容类型,它尊重客户端的请求说它可以接受的内容。你会得到一个 application/json
如果客户端发送 Accept
的响应要求它的标题:
Accept: application/json