内容简介:}则需要去访问几次提供熔断的方法就可以解决了,因为现在我们还没有访问过熔断的方法,系统找不到数据。
spring boot 2.1.X 版本中融合 Greenwich.M2 的 spring cloud
一. feign + hystrix dashboard 整合
-
gradle 中需要导入的依赖,( SpringCloudVersion = ‘2.1.0.M2’)
dependencies { compile( "org.springframework.boot:spring-boot-starter-actuator", "org.springframework.cloud:spring-cloud-starter-openfeign:${SpringCloudVersion}", "org.springframework.cloud:spring-cloud-starter-netflix-hystrix:${SpringCloudVersion}", "org.springframework.cloud:spring-cloud-starter-netflix-hystrix-dashboard:${SpringCloudVersion}", "org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:${SpringCloudVersion}" )
}
``
-
在主程序启动类中加入@EnableHystrixDashboard注解,开启hystrixDashboard。
package pers.roamer.spring.cloud.feign.client; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.hystrix.EnableHystrix; import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard; import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @EnableHystrix @EnableHystrixDashboard @EnableFeignClients public class FeignClientApplication { public static void main(String[] args) { SpringApplication.run(FeignClientApplication.class, args); } }
-
在 此界面的 url 中录入 : http://127.0.0.1:8765/actuator/hystrix.stream
注意:
在这里要加入actuator -
如果这里出现 , Unable to connect to Command Metrix Stream.
需要在applicaiton.yaml 中加入下面一段:(注意最后的*一定要加上引号,不然会启动报错。)
#解决 在 spring boot 2.0 下 hystrix.stream 404的错误 management: endpoints: web: exposure: include: '*'
-
如果一直出现 loading 的界面。
则需要去访问几次提供熔断的方法就可以解决了,因为现在我们还没有访问过熔断的方法,系统找不到数据。
以上所述就是小编给大家介绍的《spring boot 2.1.X 版本中融合 Greenwich.M2 的 spring cloud》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- 查看linux内核版本和CentOS版本
- JavaScript版本如何与ECMAScript版本相关联?
- IJPay 0.8 版本发布,兼容低版本 JDK
- fastjson 1.2.55 版本发布,Bug 修复版本
- Apache Ignite 2.9.1 版本发布,小版本更新
- Swoole v4.6.1 版本发布,Bug 修复版本
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
An Introduction to Genetic Algorithms
Melanie Mitchell / MIT Press / 1998-2-6 / USD 45.00
Genetic algorithms have been used in science and engineering as adaptive algorithms for solving practical problems and as computational models of natural evolutionary systems. This brief, accessible i......一起来看看 《An Introduction to Genetic Algorithms》 这本书的介绍吧!