springboot2.0下hystrix dashboard

2018-05-07  本文已影响0人  fengshunli

在服务端加上,就ok了

@Bean

public ServletRegistrationBeangetServlet() {

HystrixMetricsStreamServlet streamServlet =new HystrixMetricsStreamServlet();

    ServletRegistrationBean registrationBean =new ServletRegistrationBean(streamServlet);

    registrationBean.setLoadOnStartup(1);

    registrationBean.addUrlMappings("/hystrix.stream");

    registrationBean.setName("HystrixMetricsStreamServlet");

    return registrationBean;

}

上一篇下一篇

猜你喜欢

热点阅读