Health Indicator访问无结果
- 错误原因:
- 未导入依赖包
- 版本原因导致访问方式改变了
- 解决办法:
- 导入依赖包
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>- 访问http://localhost:8030/actuator查看
{ "_links": { "self": { "href": "http://localhost:8030/actuator", "templated": false }, "health": { "href": "http://localhost:8030/actuator/health", "templated": false }, "info": { "href": "http://localhost:8030/actuator/info", "templated": false } } }- 访问http://localhost:8030/actuator/health即可
本文介绍了如何解决Spring Boot中HealthIndicator访问无结果的问题。通过导入依赖包spring-boot-starter-actuator并正确配置,可以成功访问健康检查等信息。文章提供了具体的依赖配置及访问路径。
1283

被折叠的 条评论
为什么被折叠?



