解决 /actuator/beans不能访问

在Spring Boot中配置了actuator,能够访问到/actuator/health,但是在访问/actuator/beans的时候却显示如下404错误。


原因是 /actuator/health 和 /actuator/info 是默认开放的,其他的需要自己去配置。在配置文件中加入如下代码即可。

management.endpoints.web.exposure.include=*

接着访问/actuator/beans 出现下图


chrome自己不支持JSON格式转换,我们可以去应用商店下载JSON Formatter


安装成功后就可以直观的看见JSON数据了。

原文地址:https://www.cnblogs.com/tiandz/p/11404641.html