1. 监控工具
1.1 Admin Server
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId>
<version>2.7.7</version>
</dependency>
在启动类增加注解 @EnableAdminServer
访问地址 http://localhost:8010
1.2 Admin Client
引入依赖
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-client</artifactId>
<version>2.7.7</version>
</dependency>
配置 application.yml
spring
boot:
admin:
client:
url: http://localhost:8010
application:
name: boot-starter
management:
endpoints:
web:
exposure:
include: '*' # 以web方式开放所有
spring.boot.admin.client.instance.name:客户端工程的名字。默认是默认值是spring-boot-application,若配置 spring.application.name,则取之
网友评论