spring-boot-starter-actuator的作用,actuator是監控系統健康情況的工具。
使用這個功能首先要先添加依賴,如下。
<!-- 監控和管理生產環境-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
添加好之后訪問就可以訪問了,如果出錯,需在application.properties中配置
management.security.enabled=false。
參考博客:https://www.cnblogs.com/ityouknow/p/8423590.html