Spring Cloud 集成 Turbine

  • pom.xml
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-turbine</artifactId>
    <exclusions>
        <exclusion>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </exclusion>
    </exclusions>
</dependency>
  • bootstrap-dev.yml
turbine:
  app-config: service-screen
  aggregator:
    cluster-config: service-screen
  • 启动类
@EnableTurbine
@EnableDiscoveryClient
@SpringBootApplication
public class AdminTurbine {
    public static void main(String[] args) {
        SpringApplication.run(AdminTurbine.class, args);
    }
}
  • 集群端点
http://ip:port/turbine.stream?cluster=service-screen

 

上一篇:Unity坐标系


下一篇:Unity UI跟随鼠标、进度条、长按空白处执行某方法