SpringBoot集成SpringBootAdmin
Springboot版本2.2.7.RELEASE
1、server
1、创建一个Springboot应用
2、引入依赖
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId>
<version>2.2.4</version>
</dependency>
3、修改配置文件
server:
port: 6688
spring:
application:
name: SpringBootAdmin
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: ALWAYS
4、启动服务端
2、client
1、创建一个Springboot应用
2、引入依赖
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>2.2.4</version>
</dependency>
3、修改配置文件
server:
port: 6699
spring:
application:
name: client
boot:
admin:
client:
url: http://127.0.0.1:6688
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: ALWAYS
4、启动客户端