管理端:
1.集成jar
compile group: 'de.codecentric', name: 'spring-boot-admin-server', version: '2.1.6' compile group: 'de.codecentric', name: 'spring-boot-admin-server-ui', version: '2.1.6'
2.配置启动类
@SpringBootApplication @EnableAutoConfiguration @EnableAdminServer public class SpringbBootAdminApplication { public static void main(String[] args) { SpringApplication.run(SpringbBootAdminApplication.class, args); } }
3.配置文件
server: port: 8081 servlet: context-path: /admin-server
客户端:
1.集成jar
compile group: 'de.codecentric', name: 'spring-boot-admin-starter-client', version: '2.1.6'
2.配置文件
server: port: 8080 spring: boot: admin: client: url: http://localhost:8081/admin-server management: endpoints: web: exposure: include: "*"
启动管理端、客户端,打开 http://localhost:8081/admin-server/#/applications