最近在学习springcloud,实践hystrix dashboard仪表盘的时候,不管是按照书上的还是网上的,都提示Unable to connect to Command Metric Stream。

转: springboot2.0下hystrix.stream 404

看到这篇文章http://blog.csdn.net/qq_20094989/article/details/79530995说springboot2.0不行,1.5可以,试了一下果然行,那2.0为什么不行呢?


项目环境:

            spring-boot-starter-parent 2.0.0.RELEASE

            spring-cloud-starter-parent Finchley.M8

            其余所需jar和网上的文章一样,可直接参考链接文章,感谢链接作者。

来翻翻源码

我们很容易就找到 hystrix.stream 这个端点

转: springboot2.0下hystrix.stream 404

看看这个端点配置的地方

转: springboot2.0下hystrix.stream 404

来看看这个servlet

转: springboot2.0下hystrix.stream 404

真相大白了,我们只要在自己的项目里配置上这个servlet就ok了,如下

转: springboot2.0下hystrix.stream 404

综上,按照网上的方法配置好后,再多配置这个servlet就ok。

相关文章:

  • 2021-07-26
  • 2021-09-12
  • 2021-07-11
  • 2021-08-03
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-17
  • 2022-12-23
  • 2022-12-23
  • 2022-02-26
  • 2021-10-12
  • 2021-07-13
  • 2021-07-04
相关资源
相似解决方案