說明:
如果我們的spring-boot項目中添加了spring-boot-starter-actuator ,項目啟動后我們可以通過 http://localhost:8080/actuator/beans 查看啟動的項目中加載了多少beans
問題:
晚上測試時候發現報錯,但是http://localhost:8080/actuator/health可以訪問,如下圖
解決:
原因是Actuator只暴露了health和info端點,訪問其他端點需要額外配置
#開放全部
management.endpoints.web.exposure.include=*
調整后(這里火狐瀏覽器可以友好的把json格式調整)