英讯网站建设,濮阳建站建设,最好的编程培训学校,做互助盘网站找哪家好问题复现
在保证项目加入了spring-boot-starter-actuator依赖#xff0c;并成功启动后。通过浏览器进行访问#xff0c;返回如下图结果#xff1a;
问题排查
1. 查看日志 从日志中可以看到基于路径’/actuator’下只暴露了一个端点
2. 访问http://localhost:8080/actua…问题复现
在保证项目加入了spring-boot-starter-actuator依赖并成功启动后。通过浏览器进行访问返回如下图结果
问题排查
1. 查看日志 从日志中可以看到基于路径’/actuator’下只暴露了一个端点
2. 访问http://localhost:8080/actuator 确实之开放了health端点
解决方案
打开/actuator的所有端口
下面通过配置来暴露除了/shutdown之外的所有端点在application.properties中进行如下配置
management.endpoints.web.exposure.include*重启再次访问/actuator可以看到除了/shutdown之外的其他所有端点。 再次访问/actuator/beans正常显示所有的bean
引用如何启用Spring Boot Actuator的所有Endpoints