http://projects.spring.io/spring-cloud/html
https://github.com/spring-guidesjava
https://springcloud.cc
https://legacy.gitbook.com/book/eacdy/spring-cloud-book/detailsgit
https://blog.csdn.net/alinyua/article/details/80009435github
management.endpoints.web.exposure.include="*" 或者 "hystrix.stream" 包含採集的數據.web
management: health: solr: enabled: false db: enabled: false elasticsearch: enabled: false jms: enabled: false mail: enabled: false mongo: enabled: false rabbit: enabled: false redis: enabled: false
/** 系統有如下項: * rabbitHealthIndicator * diskSpaceHealthIndicator * mongoHealthIndicator * refreshScopeHealthIndicator * discoveryClient * configServerHealthIndicator * hystrixHealthIndicator */ @Component("rabbitHealthIndicator") open class rabbitHealthIndicator(var rabbitTemplate: RabbitTemplate) : RabbitHealthIndicator(rabbitTemplate) { override fun doHealthCheck(builder: Health.Builder?) { //跳過 } }
使用代碼,也能夠增長額外的分健康檢查.redis
啓用配置中心:spring
spring-cloud-context-2.0.0.RC2-sources.jar!/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapProperties.java
這個文件 三個屬性:bootstrap
看註釋根本理解不了。 在get 方法上打斷點開調試。api
實驗結果:app
config 使用文件系統, 不使用git (使用git ,修改配置須要提交 )
spring.profiles.active: native
spring.cloud.config.profile: native
spring.cloud.config.server.native.search-locations: file:/home/udi/IdeaProjects/app.shop.java/config/git/{application}
在 配置中心相應的 application應用配置文件中 添加 spring.cloud.config.overrideNone: true
文件位置: /home/udi/IdeaProjects/app.shop.java/config/git/shop-api/application.yml
https://blog.csdn.net/w1054993544/article/details/78086840
http://chenja.iteye.com/blog/2375104
https://blog.csdn.net/u012470019/article/details/77973156
https://www.cnblogs.com/sweetchildomine/p/8830863.html
有效:
1.eureka.instance.appname 必須等於 spring.application.name 而且不可缺省,因此直接佔位符 appname: ${spring.application.name}
2.prefer-ip-address: 必須爲false 或者缺省
3.fetch-registry 必須非false 或者缺省