SpringCloud
报错信息:
If it should be allowed add it to hystrix.dashboard.proxyStreamAllowList.
解决方案:
在监控模块的yml配置文件中添加
hystrix:
dashboard:
proxy-stream-allow-list: "*"
以及在被监控模块的启动类中添加
@Bean
public ServletRegistrationBean getServlet(){
HystrixMetricsStreamServlet hystrixMetricsStreamServlet = new HystrixMetricsStreamServlet();
ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(hystrixMetricsStreamServlet);
servletRegistrationBean.setLoadOnStartup(1);
servletRegistrationBean.setUrlMappings(Arrays.asList("/hystrix.stream"));
servletRegistrationBean.setName("HystrixMetricsStreamServlet");
return servletRegistrationBean;
}
本文系作者 @jiang 原创发布在 IT梦。未经许可,禁止转载。
hello
helloa