actuator/beans访问失败 -- 重学程序第一天

转自:https://www.cnblogs.com/whaleX/p/10561729.html

说明:

  如果我们的spring-boot项目中添加了spring-boot-starter-actuator ,项目启动后我们可以通过 http://localhost:8080/actuator/beans 查看启动的项目中加载了多少beans

问题:

   晚上测试时候发现报错,但是http://localhost:8080/actuator/health可以访问,如下图

         

       

解决:

  原因是Actuator只暴露了health和info端点,访问其他端点需要额外配置

      #开放全部

   management.endpoints.web.exposure.include=*

      调整后(这里火狐浏览器可以友好的把json格式调整)

      

 
 
posted @ 2020-04-06 19:45  重学程序  阅读(251)  评论(0)    收藏  举报