diff --git a/README.md b/README.md index 8c3f138a0aeff0400dd06f6070a6bc4bdf886c8a..f92f072aa3952da30ec581ff7d031c1eba55977e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# kgc47forcloud +# 胡福后 -#### 介绍 +#### {**以下是 Gitee 平台说明,您可以替换此简介** Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} diff --git a/config-zuul-dev.yml b/config-zuul-dev.yml index e887c4948f8345ea2d9fe8cd838109b6781d9638..597f8849ef990a29aeeeaf63d335b1a1ab33f6ed 100644 --- a/config-zuul-dev.yml +++ b/config-zuul-dev.yml @@ -1,42 +1,17 @@ +mess: + info: zhangsan server: - port: 8080 + port: 8083 spring: application: - name: lg32-consumer-8080 + name: cloud-user-cosumer-8083 #注册中心配置信息 eureka: client: service-url: - #defaultZone: http://root:root@127.0.0.1:6060/eureka/ - defaultZone: http://eureka1.com:6061/eureka/ - -lg32-provider: #服务名 - ribbon: - #NFloadBalancerRuleClassName: com.netflix.loadbalancer.RandomRule #随机 - #NFloadBalancerRuleClassName: com.netflix.loadbalancer.WeightedResponseTimeRule #权重 - NFloadBalancerRuleClassName: com.netflix.loadbalancer.RoundRobinRule #轮询 - - -ribbon: - ReadTimeout: 6000 #建立连接所用的时间,适用于网络状况正常的情况下,两端两端连接所用的时间 - ConnectionTimeout: 6000 #建立连接后,服务器读取到可用资源的时间 - -#开启fegin降级 -feign: - hystrix: - enabled: true - - -######################配置请求超时时间########################## -hystrix: - command: - default: - execution: - isolation: - thread: - timeoutInMilliseconds: 7000 - + defaultZone: http://root:root@127.0.0.1:6060/eureka/ + #defaultZone: http://eureka1.com:6061/eureka/ management: endpoints: diff --git a/kgc57-cloud-config-consumer-dev.yml b/kgc57-cloud-config-consumer-dev.yml new file mode 100644 index 0000000000000000000000000000000000000000..d88c071545d4f3a288be1eb60a6e457f5f39c615 --- /dev/null +++ b/kgc57-cloud-config-consumer-dev.yml @@ -0,0 +1,68 @@ +hello: + info: + name: hello java + +server: + port: 8082 +spring: + application: + name: cloud-consumer-8080 + boot: + admin: + client: + url: http://127.0.0.1:5050 + mvc: + static-path-pattern: /** + resources: + static-locations: classpath:/templates/,classpath:/META-NF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/ + thymeleaf: + prefix: classpath:/templates/ + suffix: .html + cache: false + encoding: UTF-8 + +management: + endpoints: + web: + exposure: + include: "*" #全部监控 + #include: hystrix.stream + endpoint: + health: + show-details: ALWAYS + + + +eureka: + client: + service-url: + defaultZone: http://root:root@localhost:6060/eureka/ #注意用户名和密码 @ + #defaultZone: http://root:root@eureka1.com:6061/eureka/,http://root:root@eureka2.com:6062/eureka/ + register-with-eureka: true #向eurek server 注册 + fetch-registry: true #获取信息列表 + server: + enable-self-preservation: false #禁用保护,默认true + eviction-interval-timer-in-ms: 10000 #清理间隔(默认是60*1000) + +#cloud-provider-90x: +# ribbon: +# NFloadBalancerRuleClassName: com.netflix.loadbalancer.RoundRobinRule + +#开启熔断 +feign: + hystrix: + enabled: true + +#设置消费调用提供者的时间 +ribbon: + ReadTimeout: 10000 #建立连接所用的时间,适用于网络状况正常的情况下,两端两端连接所用的时间 + ConnectionTimeout: 10000 #建立连接后,服务器读取到可用资源的时间 + +#降级熔断运行时间 +hystrix: + command: + default: + execution: + isolation: + thread: + timeoutInMilliseconds: 7000 diff --git a/user-consumer-dev.yml b/user-consumer-dev.yml index b1739cc45cc21e6488335b8ed52befef0f834cda..f36cb8185fa5c7535eea6922584f9f3c58e539e9 100644 --- a/user-consumer-dev.yml +++ b/user-consumer-dev.yml @@ -1,29 +1,49 @@ -mymess: hi you are caixukun? +xx: + yy: + hello: hello java + server: - port: 8899 - + port: 8086 spring: application: - name: lg33-cloud-consumer-8080 - boot: - admin: - client: - url: http://127.0.0.1:5050 -#注册中心 + name: user-consumer8080 + eureka: client: service-url: - #defaultZone: http://root:root@127.0.0.1:6060/eureka/ - defaultZone: http://eureka1.com:6062/eureka/,http://eureka1.com:6061/eureka/ + defaultZone: http://admin:123@localhost:6060/eureka/ #注意用户名和密码 @ + #defaultZone: http://admin:123@eureka1.com:6061/eureka/,http://admin:123@eureka2.com:6062/eureka/,http://admin:123@eureka3.com:6063/eureka/ + register-with-eureka: true #向eurek server 注册 + fetch-registry: true #获取信息列表 + server: + enable-self-preservation: false #禁用保护,默认true + eviction-interval-timer-in-ms: 10000 #清理间隔(默认是60*1000) feign: hystrix: - enabled: true #默认false - -######################### Ribbon 客户端超时控制 ################################### + enabled: true #默认false true:开启降级 +# +########################## Ribbon 客户端超时控制 ################################### +USER-PROVIDER90X: + ribbon: + #NFLoadBalancerRuleClassName: com.netflix.loadbalancer.RandomRule #设置随机负载均衡 + NFloadBalancerRuleClassName: com.netflix.loadbalancer.RoundRobinRule #轮询 ribbon: ReadTimeout: 6000 #建立连接所用的时间,适用于网络状况正常的情况下,两端两端连接所用的时间 ConnectionTimeout: 6000 #建立连接后,服务器读取到可用资源的时间 - - +#######################配置请求超时时间########################## +#hystrix: +# command: +# default: +# execution: +# isolation: +# thread: +# timeoutInMilliseconds: 7000 +# +# ####################配置具体方法超时时间 为 3 秒######################## +# DeptHystrixService#deptInfo_Timeout(Integer): +# execution: +# isolation: +# thread: +# timeoutInMilliseconds: 3000 \ No newline at end of file