改进spring boot添加监控
服务器端
在启动类上添加 @EnableAdminServer @SpringBootApplication
在pom.xml上添加
<dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-server</artifactId> <version>1.5.7</version> </dependency> <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-server-ui</artifactId> <version>1.5.7</version> </dependency>
客户端
在application.properties中添加spring.boot.admin.url=http://localhost:8080
spring.application.name=spring-boot-admin-client
#禁用安全控制
management.security.enabled=false
2.在pom.xml
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>1.5.7</version>
</dependency>
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。