【发布时间】:2016-04-14 01:56:23
【问题描述】:
我正在使用 spring boot 1.3.1 和 spring cloudl Brixtom.M4,在使用 springboot 1.3.1 时,我发现 Turbine-AMQP 项目不再可用,而是我们现在拥有 Spring Turbine Stream 项目。 我用 rabbitmq 或 kafka 使用 SpringTurbine 并想监视在 Zuul 中注册的所有路由的 hystrix 流,我能够看到 zuul 的 hystrix.stream 并且还能够在 hystrix 仪表板中看到它,但不知道如何使用弹簧涡轮流。 在网上我找到了使用 Turbine AMQP 的代码和文档。
我有 zuul 服务器运行带有依赖关系的广告 http://localhost:9003/
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zuul</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
和 main.java 一样
@SpringBootApplication
@EnableZuulProxy
@EnableCircuitBreaker
public class EdgeServerApplication {
public static void main(String[] args) {
SpringApplication.run(EdgeServerApplication.class, args);
}
}
我也有 springTurbinestream 项目
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-turbine-stream</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
org.springframework.boot 弹簧引导启动器执行器
TurbineStream 的主类为
@SpringBootApplication
@EnableTurbineStream
@EnableDiscoveryClient
public class WiziqTurbineApplication {
public static void main(String[] args) {
SpringApplication.run(WiziqTurbineApplication.class, args);
}
}
当我运行应用程序并转到http://localhost:9003/hystrix.stream 时,我看到了流,但如果我转到http://localhost:9003/turbine.stream,它就会出错。
我做错了什么?
【问题讨论】:
-
请提供投反对票的原因:(
-
我没有投反对票,但我没有看到编程问题。我可能是错的,但我也认为它有点宽泛。
-
还不错,但如果您知道答案,请发布
-
我不知道你在说什么,除了 Spring Boot。您到底对它的工作方式不了解?重新格式化问题以适合本网站,即某种代码。如果你不能,那么只需删除问题并自己研究它,然后如果有任何特定的编程问题回来。
标签: java spring spring-boot spring-cloud turbine