在Spring Boot中配置了actuator,能夠訪問到/actuator/health,但是在訪問/actuator/beans的時候卻顯示如下404錯誤。
原因是 /actuator/health 和 /actuator/info 是默認開放的,其他的需要自己去配置。在配置文件中加入如下代碼即可。
management.endpoints.web.exposure.include=*
接着訪問/actuator/beans 出現下圖
chrome自己不支持JSON格式轉換,我們可以去應用商店下載JSON Formatter
安裝成功后就可以直觀的看見JSON數據了。