Commit 2e6779ac by 袁伟铭

Merge remote-tracking branch 'origin/master'

parents 29360d66 07802ff2
......@@ -14,12 +14,21 @@ spring:
eureka:
instance:
prefer-ip-address: true
lease-renewal-interval-in-seconds: 5 #向服务端发送心跳间隔
lease-expiration-duration-in-seconds: 15 #告诉服务端多少秒没收到心跳将我踢出掉。
lease-renewal-interval-in-seconds: 2 #向服务端发送心跳间隔
lease-expiration-duration-in-seconds: 6 #告诉服务端多少秒没收到心跳将我踢出掉
instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
client:
# 客户端拉取readOnly缓存的时间间隔,默认是30s
registry-fetch-interval-seconds: 3 # 拉取注册表信息间隔时间
registry-fetch-interval-seconds: 2 #从服务端注册表中获取注册信息的时间间隔
serviceUrl:
defaultZone: @register.url@
feign:
client:
config:
default:
connect-timeout: 2000 #连接超时时间
read-timeout: 10000 #读超时时间
ribbon:
# ribbon服务列表刷新间隔(单位ms)
ServerListRefreshInterval: 2000
......@@ -14,12 +14,11 @@ spring:
eureka:
instance:
prefer-ip-address: true
lease-renewal-interval-in-seconds: 5 #向服务端发送心跳间隔
lease-expiration-duration-in-seconds: 15 #告诉服务端多少秒没收到心跳将我踢出掉。
lease-renewal-interval-in-seconds: 2 #向服务端发送心跳间隔
lease-expiration-duration-in-seconds: 6 #告诉服务端多少秒没收到心跳将我踢出掉
instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
client:
# 客户端拉取readOnly缓存的时间间隔,默认是30s
registry-fetch-interval-seconds: 3 # 拉取注册表信息间隔时间
registry-fetch-interval-seconds: 2 #从服务端注册表中获取注册信息的时间间隔
serviceUrl:
defaultZone: @register.url@
......@@ -27,5 +26,9 @@ feign:
client:
config:
default:
connectTimeout: 5000 #连接超时时间
readTimeout: 10000 #读超时时间
connect-timeout: 2000 #连接超时时间
read-timeout: 10000 #读超时时间
ribbon:
# ribbon服务列表刷新间隔(单位ms)
ServerListRefreshInterval: 2000
......@@ -22,12 +22,11 @@ spring:
eureka:
instance:
prefer-ip-address: true
lease-renewal-interval-in-seconds: 5 #向服务端发送心跳间隔
lease-expiration-duration-in-seconds: 15 #告诉服务端多少秒没收到心跳将我踢出掉。
lease-renewal-interval-in-seconds: 2 #向服务端发送心跳间隔
lease-expiration-duration-in-seconds: 6 #告诉服务端多少秒没收到心跳将我踢出掉
instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
client:
# 客户端拉取readOnly缓存的时间间隔,默认是30s
registry-fetch-interval-seconds: 3 # 拉取注册表信息间隔时间
registry-fetch-interval-seconds: 2 #从服务端注册表中获取注册信息的时间间隔
serviceUrl:
defaultZone: @register.url@
......
......@@ -6,8 +6,8 @@ spring:
security:
user:
name: admin
password: 123456
eureka:
password: GXfy2021
eureka: # 相关文章:https://blog.csdn.net/weixin_49149614/article/details/121059046
instance:
#设置使用IP注册就会优先使用IP,hostname则无效
prefer-ip-address: true
......@@ -17,10 +17,10 @@ eureka:
enable-self-preservation: false
# 主动检测失效间隔,配置成3秒,默认60000
eviction-interval-timer-in-ms: 3000
# 禁用use-read-only-response-cache只读缓存或者减少response-cache-update-interval-ms更新缓存的时间间隔都可以更快的同步实例信息
# use-read-only-response-cache: false
# 减少readWrite 和 readOnly 同步时间间隔。
response-cache-update-interval-ms: 3000
# 拉取服务的时候,不从ReadOnlyCacheMap里查,直接从ReadWriteCacheMap取。
use-read-only-response-cache: false # 关闭从ReadOnlyCacheMap拉取数据。
# 缩短ReadWriteCacheMap向ReadOnlyCacheMap同步的时间间隔,默认30秒
response-cache-update-interval-ms: 3000 # 减少readWrite 和 readOnly 同步时间间隔。readWrite更新到readOnly
client:
# 表示是否将自己注册到Eureka Server,默认为true。
register-with-eureka: false
......
......@@ -11,6 +11,9 @@ import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author wilmiam
*/
@Api(tags = "上传相关")
@RestController
@RequestMapping("/file")
......
......@@ -14,12 +14,14 @@ spring:
eureka:
instance:
prefer-ip-address: true
lease-renewal-interval-in-seconds: 5 #向服务端发送心跳间隔
lease-expiration-duration-in-seconds: 15 #告诉服务端多少秒没收到心跳将我踢出掉。
lease-renewal-interval-in-seconds: 2 #向服务端发送心跳间隔
lease-expiration-duration-in-seconds: 6 #告诉服务端多少秒没收到心跳将我踢出掉
instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
client:
# 客户端拉取readOnly缓存的时间间隔,默认是30s
registry-fetch-interval-seconds: 3 # 拉取注册表信息间隔时间
registry-fetch-interval-seconds: 2 #从服务端注册表中获取注册信息的时间间隔
serviceUrl:
defaultZone: @register.url@
ribbon:
# ribbon服务列表刷新间隔(单位ms)
ServerListRefreshInterval: 2000
......@@ -5,19 +5,21 @@ spring:
name: GATEWAY-SERVER
cloud:
gateway:
default-filters:
default-filters: # 剔除响应头中重复的值 RETAIN_FIRST:只保留第一个 RETAIN_LAST:保留最后一个 RETAIN_UNIQUE:去除重复
- DedupeResponseHeader=Access-Control-Allow-Origin, RETAIN_UNIQUE
discovery:
locator:
enabled: true
lower-case-service-id: true
globalcors:
cors-configurations:
'[/**]':
#这里有个allowCredentials: true这个东西是设置允许访问携带cookie的,这点一定要和前端对应!
allowCredentials: true
#可以填写多个域名用","隔开 例如:"http://www.xiaolc.cn,https://spring.io" "*"代表允许所有
allowedOriginPatterns: "*"
allowedMethods: "PUT, POST, GET, OPTIONS, DELETE"
allowedHeaders: "*"
maxAge: 3600
allowedMethods: "GET, POST, DELETE, PUT, OPTIONS"
routes:
- id: api
uri: lb://API-SERVER
......
......@@ -14,12 +14,11 @@ spring:
eureka:
instance:
prefer-ip-address: true
lease-renewal-interval-in-seconds: 5 #向服务端发送心跳间隔
lease-expiration-duration-in-seconds: 15 #告诉服务端多少秒没收到心跳将我踢出掉。
lease-renewal-interval-in-seconds: 2 #向服务端发送心跳间隔
lease-expiration-duration-in-seconds: 6 #告诉服务端多少秒没收到心跳将我踢出掉
instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
client:
# 客户端拉取readOnly缓存的时间间隔,默认是30s
registry-fetch-interval-seconds: 3 # 拉取注册表信息间隔时间
registry-fetch-interval-seconds: 2 #从服务端注册表中获取注册信息的时间间隔
serviceUrl:
defaultZone: @register.url@
......@@ -14,12 +14,21 @@ spring:
eureka:
instance:
prefer-ip-address: true
lease-renewal-interval-in-seconds: 5 #向服务端发送心跳间隔
lease-expiration-duration-in-seconds: 15 #告诉服务端多少秒没收到心跳将我踢出掉。
lease-renewal-interval-in-seconds: 2 #向服务端发送心跳间隔
lease-expiration-duration-in-seconds: 6 #告诉服务端多少秒没收到心跳将我踢出掉
instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
client:
# 客户端拉取readOnly缓存的时间间隔,默认是30s
registry-fetch-interval-seconds: 3 # 拉取注册表信息间隔时间
registry-fetch-interval-seconds: 2 #从服务端注册表中获取注册信息的时间间隔
serviceUrl:
defaultZone: @register.url@
feign:
client:
config:
default:
connect-timeout: 2000 #连接超时时间
read-timeout: 10000 #读超时时间
ribbon:
# ribbon服务列表刷新间隔(单位ms)
ServerListRefreshInterval: 2000
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment