springcloud配置参数说明
1. eureka配置
server.port:
spring.application.name=eureka-service:
eureka.instance.hostname=localhost:
eureka.client.register-with-eureka: false
eureka.client.fetch-registry: false
eureka.client.serviceUrl.defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka:
eureka.server.lease-expiration-duration-in-seconds:
eureka.server.lease-renewal-interval-in-seconds:
eureka.server.eviction-interval-timer-in-ms:
eureka.server.enable-self-preservation: false
hello-service.ribbon.ConnectTimeout: 500
feign.compression.request.enabled: true
feigan.compression.response.enabled: true
spring.cloud.config.server.git.uri: https://gitlab.com/xxx/xxx.git
spring.cloud.config.server.git.search-paths: spring-cloud-config-file
spring.cloud.config.server.git.username: xxx
spring.cloud.config.server.git.password: 123SpringCloud
spring.profiles.active: default
spring.cloud.config.server.encrypt.enabled: false
spring.datasource.password: "{cipher}d495ce8603af9676450736e119"
2. Zuul(网关配置)
zuul.filter.root : "groovy/filters"
zuul.filter.refresh!nterval: 5
zuu.routes.serviceid: zuul-sale-service
zuul.ignoredPatterns : /sale/noRoute
zuul.routes.api-a.path: /api-a/**
zuul.routes.api-a.url: http://localhost:9001
或
zuul.routes.api-a.path: /api-a/**
zuul.routes.api-a.serviceId: hello-service
或
zuul.routes.hello-service.path: /hello-service/**
zuul.routes.hello-service.serviceId: hello-service
zuul :
SendForwardFilter :
route:
disable: true
3. ribbon(负载均衡配置)
ribbon.ConnectTimeout: 500
ribbon.ReadTimeout: 5000
4. hystrix (熔断配置)
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 5000
hystrix.command.hello.execution.isolation.thread.timeoutInMilliseconds: 5000
5. config(集群配置中心)
1. 配置server
server:
port : 8888
management :
security :
enabled : false
spring :
application:
name: configserver
profiles:
active: subversion
cloud:
config :
server:
svn :
uri : https : //localhost/svn/test-project
username: admin
password: 123456
default-label : default-config
2. 配置client
spring:
application:
name: user
profiles:
active: dev
cloud:
config:
uri: http://localhost:8762
fail-fast: false
3. 重试机制
spring.cloud.config.retry.initial-interval:
spring.cloud.config.retry.max-attempts:
spring.cloud.config.retry.max-interval:
spring.cloud.config.retry.multiplier:
4. 安全配置
security:
user :
name : root
password : root
spring:
cloud:
config:
username: root
password: root