在Spring Boot中配置了actuator以後,我們可以正常訪問/actuator跟/actuator/health,但是查看其它的路徑時,會出現404錯誤。
原因是 /actuator/health 和 /actuator/info 是默認開放的,其他的需要自己去配置。在SpringBoot配置文件中加入如下代碼即可。
management.endpoints.web.exposure.include=*
在Spring Boot中配置了actuator以後,我們可以正常訪問/actuator跟/actuator/health,但是查看其它的路徑時,會出現404錯誤。
原因是 /actuator/health 和 /actuator/info 是默認開放的,其他的需要自己去配置。在SpringBoot配置文件中加入如下代碼即可。
management.endpoints.web.exposure.include=*