【随手记录】关于 actuator/beans 不能访问

说明:

  如果我们的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 @ 2019-03-19 21:57  空知大仙人  阅读(3058)  评论(1编辑  收藏  举报