Spring Boot提供Actuator對應用系統的自省和監控的整合功能
阿新 • • 發佈:2018-11-09
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即可