ebike-plus/ebike-gateway/src/main/resources/application-dev.yml
2025-09-02 15:35:01 +08:00

118 lines
3.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

server:
port: 10010
spring:
application:
name: ebike-gateway
jackson:
serialization:
write-dates-as-timestamps: false
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
cloud:
nacos:
server-addr: 127.0.0.1:8848 # nacos
username: nacos
password: nacos
gateway:
# 跨域配置
globalcors:
cors-configurations:
'[/**]': # 允许跨域访问的资源
allowedOriginPatterns: "*" #跨域允许来源
allowedHeaders: "*"
allowedMethods: "*"
allowCredentials: true
maxAge: 360000
routes:
- id: ebike-gather # 路由标示,必须唯一
uri: lb://ebike-gather # 路由的目标地址
predicates: # 路由断言,判断请求是否符合规则
- Path=/gather/** # 路径断言,判断路径是否是以/wuyu开头如果是则符合
- id: ebike-staff
uri: lb://ebike-staff
predicates:
- Path=/staff/**
filters:
- StripPrefix=1 # 去掉/user/部分
- id: ebike-orders
uri: lb://ebike-orders
predicates:
- Path=/order/**
filters:
- StripPrefix=1
- id: ebike-maintenance # 路由标示,必须唯一
uri: lb://ebike-maintenance # 路由的目标地址
predicates: # 路由断言,判断请求是否符合规则
- Path=/maintenance/** # 路径断言,判断路径是否是以/maintenance/开头,如果是则符合
filters:
- StripPrefix=1 # 去掉/maintenance/部分
- id: ebike-operate
uri: lb://ebike-operate
predicates:
- Path=/operate/**
filters:
- StripPrefix=1
- id: ebike-payment
uri: lb://ebike-payment
predicates:
- Path=/payment/**
filters:
- StripPrefix=1
data:
# redis配置
redis:
# Redis数据库索引默认为0
database: 1
# Redis服务器地址
host: 47.109.71.130
# Redis服务器连接端口
port: 6379
# Redis服务器连接密码默认为空
password: 970529
# 连接超时时间
lettuce:
pool:
# 连接池最大连接数
max-active: 200
# 连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# 连接池中的最大空闲连接
max-idle: 10
# 连接池中的最小空闲连接
min-idle: 0
############## Sa-Token 配置 (文档: https://sa-token.cc) ##############
sa-token:
# token 名称(同时也是 cookie 名称)
token-name: Authorization
# token 有效期(单位:秒) 默认30天-1 代表永久有效
timeout: 2592000
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
active-timeout: -1
# 是否允许同一账号多地同时登录 (为 true 时允许一起登录, 为 false 时新登录挤掉旧登录)
is-concurrent: false
# 在多人登录同一账号时,是否共用一个 token (为 true 时所有登录共用一个 token, 为 false 时每次登录新建一个 token
is-share: false
# token 风格默认可取值uuid、simple-uuid、random-32、random-64、random-128、tik
token-style: random-32
# 是否输出操作日志
is-log: true
# 开启检查的登陆状态的开关
is-check: false
# 自定义加解密配置
cdzy:
gateway:
secure:
request-switch:
enable: true
response-switch:
enable: false
management:
endpoints:
web:
exposure:
include: health,info
endpoint:
health:
show-details: always