springcloud -hystrix-dashboard填坑
作者:互联网
当在springcloud项目时候搭建springcloud -hystrix-dashboard ,如果父亲采用spring boot 2.0以上 一般需要在appliation加入注解
@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; } }
如仅仅是以普通项目开头的则是无需加上版本
标签:registrationBean,ServletRegistrationBean,hystrix,springcloud,填坑,HystrixMetricsSt 来源: https://blog.csdn.net/hxb_hexiaobo/article/details/90696455