Spring Boot 2.0 下 hystrix仪表盘 404 问题细节
2020-03-29 19:27
387 查看
网上看到很多18,17年的关于解决 该问题的方法,方法是对的,如加
@Bean
public ServletRegistrationBean getServlet() {
HystrixMetricsStreamServlet streamServlet = new HystrixMetricsStreamServlet();
ServletRegistrationBean registrationBean = new ServletRegistrationBean(streamServlet);
registrationBean.setLoadOnStartup(1);
registrationBean.addUrlMappings("/actuator/hystrix.stream");
registrationBean.setName(“HystrixMetricsStreamServlet”);
return registrationBean;
}
但是要注意的是 2.0版本开启的请求路径变成了/actuator/hystrix.stream 所以在网上摘抄时要注意该问题,记得将代码路径修改,说白了就是暴露该路径的请求。网上现有的基本都是/hystrix.stream路径
相关文章推荐
- springboot 2.0 集成 shiro 和 thymeleaf-extras-shiro 2.0 使用过程遇到的问题
- springboot2.0 war在tomcat下启动一直404
- springboot 1.5 升级 2.0 出现以下问题NoClassDefFoundError: bind/RelaxedPropertyRes求解决答案!
- Springboot项目中报404问题
- Springboot项目部署到tomcat中访问接口出现404的问题
- spring boot成功启动后访问报错404的问题
- 解决Spring boot2.0+配置拦截器拦截静态资源的问题
- 关于SpringBoot2.0版本使用过程中遇到问题
- Java Spring boot 2.0 跨域问题的解决
- SpringBoot 2.0返回Date问题。
- spring boot 跨域问题,很细节
- 阿里工程师如何快速排查Spring Boot应用404/401问题
- Springboot2.0中jpa默认创建的mysql表为myisam引擎问题
- springboot项目访问jsp页面404问题
- 关于 SpringBoot项目启动成功,接口无法访问且提示404的问题
- springboot+idea+jsp 404问题
- Spring Boot2.0之多数据源分布式事务问题
- IntelliJ IDEA+SpringBoot+Tomcat部署404问题
- Springboot2.0(Spring5.0)中个性化配置项目上的细节差异
- spring boot 2.0 跨域问题