Turbine遇到一直显示reportingHostsLast10Seconds为0的一种解决办法

详情参考https://blog.csdn.net/weixin_39080216/article/details/80784483博文。

在该博文的基础上我将两个服务的Hystrix.stream地址改为了actuator/hystrix.stream就可以成功访问TurbineDashboard了

两个服务的HystrixDashboard配置如下:

 @Bean
    public ServletRegistrationBean getServlet(){
        HystrixMetricsStreamServlet streamServlet = new HystrixMetricsStreamServlet();
        ServletRegistrationBean registrationBean = new ServletRegistrationBean(streamServlet);
        registrationBean.setLoadOnStartup(1);
        registrationBean.addUrlMappings("/actuator/hystrix.stream");
        registrationBean.setName("HystrixMetricsStream");
        return registrationBean;
    }
发布了100 篇原创文章 · 获赞 12 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/qq_31404603/article/details/104715958
今日推荐