forezp/SpringCloudLearning

Hystrix 仪表盘在Feign服务中不能用

liuquansen0823 opened this issue · 1 comments

Hystrix 仪表盘在Feign服务中不能用

界面是可以的,不过输入stream后 提示:

Unable to connect to Command Metric Stream.

qq 20171114235738

根据其他博主说的要加上@EnableCircuitBreaker。可是反而整个Feign服务跑不起来了

geemu commented

@EnableCircuitBreaker
@EnableHystrixDashboard
@EnableDiscoveryClient
@EnableFeignClients
@SpringBootApplication

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-hystrix</artifactId>
    </dependency>

这样就可以了,添加仪表盘进来的的话就需要单独再导入hystrix的包进来