解决 /actuator/beans不能访问

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

 


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

management.endpoints.web.exposure.include=*

 

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

解决 /actuator/beans不能访问

 


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

解决 /actuator/beans不能访问

 


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

解决 /actuator/beans不能访问

 

上一篇:springboot线程中获取spring beans


下一篇:创建一个Spring项目