我正在尝试运行Spring Boot(使用Spring Cloud)+ Eureka Server + Hystrix Dashboard和Turbine流,但是我遇到了一个问题,到目前为止我找不到任何解决方案.我使用Spring Boot 1.2.1.RELEASE和Spring Cloud 1.0.0.RC2.这是我有的:
第一个实例是运行Eureka服务器和Hystrix仪表板:
@Configuration
@EnableAutoConfiguration
@EnableEurekaServer
@EnableHystrixDashboard
@EnableDiscoveryClient
class Application {
public static void main(String[] args) {
SpringApplication.run Application, args
}
}
Run Code Online (Sandbox Code Playgroud)
在这里你可以找到build.gradle该实例 - https://gist.github.com/wololock/570272ad7cf2d14a4d3c
Eureka服务器运行正常,我可以在eureka服务器仪表板上看到已注册的实例,我也可以LoadBalancer使用其ID来获取已注册实例的URL.到目前为止一切都很好.
我有一些使用@EnableHystrix注释运行的实例,@HystrixCommand用于定义Hystrix必须监视哪些方法.当我将URL传递给单个实例的hystrix.stream到Hystrix仪表板时,我可以看到它运行没有问题.
我也有单独的Turbine服务器,而不是复杂的服务器:
@EnableAutoConfiguration
@EnableTurbine
@Configuration
@EnableDiscoveryClient
class Application {
public static void main(String[] args) {
SpringApplication.run Application, args
}
}
Run Code Online (Sandbox Code Playgroud)
在这里您可以找到build.gradleTurbine服务器实例 - https://gist.github.com/wololock/ff0d855b8a890232851e
它使用非常简单的配置,主要基于样本涡轮应用程序提供的配置 - https://github.com/spring-cloud-samples/turbine
info:
component: Turbine
endpoints:
restart:
enabled: …Run Code Online (Sandbox Code Playgroud)