zoukankan      html  css  js  c++  java
  • Spring cloud Hystrix仪表盘之Unable to connect to Command Metric Stream.

    springboot 2.0需要添加 ServletRegistrationBean 因为springboot的默认路径不是 "/hystrix.stream",只要在自己的项目里配置上下面的servlet就可以了

    @Bean
        public ServletRegistrationBean getServlet() {
            HystrixMetricsStreamServlet streamServlet = new HystrixMetricsStreamServlet();
            ServletRegistrationBean registrationBean = new ServletRegistrationBean(streamServlet);
            registrationBean.setLoadOnStartup(1);
            registrationBean.addUrlMappings("/hystrix.stream");
            registrationBean.setName("HystrixMetricsStreamServlet");
            return registrationBean;
        }

    参考文章:https://www.cnblogs.com/mark7/p/8920288.html

  • 相关阅读:
    例2-3
    例2-2
    例2-1
    p14
    第一次作业
    例1-1
    第二次作业(2)
    第二次作业
    第三章3-3
    第三章3-2
  • 原文地址:https://www.cnblogs.com/lzj123/p/9722177.html
Copyright © 2011-2022 走看看