feat: gateway添加分享圈网关

This commit is contained in:
landaiqing
2024-07-17 17:21:27 +08:00
parent b1bdf2862a
commit 2394378c89

View File

@@ -1,70 +1,76 @@
server: server:
port: 5050 port: 5050
spring: spring:
cloud: cloud:
gateway: gateway:
routes: routes:
- id: oss - id: oss
uri: lb://schisandra-cloud-storage-oss uri: lb://schisandra-cloud-storage-oss
predicates: predicates:
- Path=/oss/** - Path=/oss/**
filters: filters:
- StripPrefix=1 - StripPrefix=1
- id: auth - id: auth
uri: lb://schisandra-cloud-storage-auth uri: lb://schisandra-cloud-storage-auth
predicates: predicates:
- Path=/auth/** - Path=/auth/**
filters: filters:
- StripPrefix=1 - StripPrefix=1
- id: system - id: system
uri: lb://schisandra-cloud-storage-system uri: lb://schisandra-cloud-storage-system
predicates: predicates:
- Path=/system/** - Path=/system/**
filters: filters:
- StripPrefix=1 - StripPrefix=1
- id: wechat - id: wechat
uri: lb://schisandra-cloud-storage-wechat uri: lb://schisandra-cloud-storage-wechat
predicates: predicates:
- Path=/wechat/** - Path=/wechat/**
filters: filters:
- StripPrefix=1 - StripPrefix=1
# redis配置 - id: share
redis: uri: lb://schisandra-cloud-storage-share
# Redis数据库索引默认为0 predicates:
database: 1 - Path=/share/**
# Redis服务器地址 filters:
host: 1.95.0.111 - StripPrefix=1
# Redis服务器连接端口 # redis配置
port: 6379 redis:
# Redis服务器连接密码(默认为 # Redis数据库索引(默认为0
password: LDQ20020618xxx database: 1
# 连接超时时间 # Redis服务器地址
timeout: 2s host: 1.95.0.111
lettuce: # Redis服务器连接端口
pool: port: 6379
# 连接池最大连接数 # Redis服务器连接密码默认为空
max-active: 200 password: LDQ20020618xxx
# 连接池最大阻塞等待时间(使用负值表示没有限制) # 连接超时时间
max-wait: -1ms timeout: 2s
# 连接池中的最大空闲连接 lettuce:
max-idle: 10 pool:
# 连接池中的最小空闲连接 # 连接池最大连接
min-idle: 0 max-active: 200
############## Sa-Token 配置 (文档: https://sa-token.cc) ############## # 连接池最大阻塞等待时间(使用负值表示没有限制)
sa-token: max-wait: -1ms
# token 名称(同时也是 cookie 名称) # 连接池中的最大空闲连接
token-name: token max-idle: 10
# token 有效期(单位:秒) 默认30天-1 代表永久有效 # 连接池中的最小空闲连接
timeout: 2592000 min-idle: 0
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结 ############## Sa-Token 配置 (文档: https://sa-token.cc) ##############
active-timeout: -1 sa-token:
# 是否允许同一账号多地同时登录 (为 true 时允许一起登录, 为 false 时新登录挤掉旧登录 # token 名称(同时也是 cookie 名称
is-concurrent: true token-name: token
# 在多人登录同一账号时,是否共用一个 token (为 true 时所有登录共用一个 token, 为 false 时每次登录新建一个 token # token 有效期(单位:秒) 默认30天-1 代表永久有效
is-share: true timeout: 2592000
# token 风格默认可取值uuid、simple-uuid、random-32、random-64、random-128、tik # token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
token-style: random-32 active-timeout: -1
# 是否输出操作日志 # 是否允许同一账号多地同时登录 (为 true 时允许一起登录, 为 false 时新登录挤掉旧登录)
is-log: false is-concurrent: true
token-prefix: schisandra # 在多人登录同一账号时,是否共用一个 token (为 true 时所有登录共用一个 token, 为 false 时每次登录新建一个 token
is-share: true
# token 风格默认可取值uuid、simple-uuid、random-32、random-64、random-128、tik
token-style: random-32
# 是否输出操作日志
is-log: false
token-prefix: schisandra
is-print: false is-print: false