一、整合Admin
1、添加依赖(注意版本和springboot版本要一致,否则会报错,我的springboot版本是2.5.5)
<dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-starter-server</artifactId> <version>2.5.0</version> </dependency>
2、配置服务端 eureka yaml文件
spring: application: name: eureka boot: admin: context-path: /admin ui: public-url: http://localhost:9900/admin title: Sunshine Admin #暴露服务 management: endpoints: web: exposure: include: '*' endpoint: health: show-details: always
3、添加客户端依赖
<dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-starter-client</artifactId> <version>2.5.0</version> </dependency>