spring boot admin 使用consul discovery
maven
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!--<dependency>--> <!--<groupId>org.springframework.cloud</groupId>--> <!--<artifactId>spring-cloud-starter-consul-discovery</artifactId>--> <!--</dependency>--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-consul-all</artifactId> </dependency> <dependency> <groupId>org.jolokia</groupId> <artifactId>jolokia-core</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-turbine</artifactId> <exclusions> <exclusion> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka</artifactId> </exclusion> </exclusions> </dependency> <!--spring boot admin--> <!-- https://mvnrepository.com/artifact/de.codecentric/spring-boot-admin-server --> <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-server</artifactId> <version>${admim.version}</version> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-server-ui-turbine</artifactId> <version>${admim.version}</version> </dependency> <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-server-ui</artifactId> <version>${admim.version}</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> </dependency>
config
turbine: appConfig: product-service,recommend-service clusterNameExpression: new String("default") spring.boot.admin: discovery: ignored-services: consul turbine: clusters: default url: http://localhost:8989/turbine.stream
bootstrap
spring: application: name: turbine cloud: consul: enabled: true host: 192.168.99.100 port: 8500 discovery: enabled: true register: true healthCheckInterval: 15s health-check-timeout: 1s instance-id: ${spring.application.name}:${spring.cloud.consul.discovery.instance_id:${random.value}} tags: dev
doc
相关推荐
anloan 2020-08-18
oLeiShen 2020-06-25
hyxinyu 2020-06-10
javashixisheng 2020-06-05
ajuan 2020-06-04
尹小鱼 2020-06-03
wishli 2020-05-19
JustHaveTry 2020-05-08
zhaolisha 2020-05-03
kong000dao0 2020-04-25
andylanzhiyong 2020-03-20
糊一笑 2020-03-07
furongwei 2020-03-03
凯哥Java 2020-02-03
xsg 2020-01-10
工作中的点点滴滴 2020-01-07
杨友山 2020-01-03
zhangll00 2019-12-31
Caleb0 2019-12-27