You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
3.4 KiB
YAML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

server:
# 端口
port: 8027
############## Sa-Token 配置 (文档: https://sa-token.cc) ##############
sa-token:
# token 名称(同时也是 cookie 名称)
token-name: Authorization
# token 有效期(单位:秒) 默认30天-1 代表永久有效
timeout: 1296000
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
active-timeout: -1
# 是否允许同一账号多地同时登录 (为 true 时允许一起登录, 为 false 时新登录挤掉旧登录)
is-concurrent: true
# 在多人登录同一账号时,是否共用一个 token (为 true 时所有登录共用一个 token, 为 false 时每次登录新建一个 token
is-share: false
jwt-secret-key: "playeduxyz"
token-prefix: "Bearer"
# token 风格默认可取值uuid、simple-uuid、random-32、random-64、random-128、tik
# token-style: jwt
is-log: true
sso-server:
is-slo: true
# Ticket有效期 (单位: 秒),默认五分钟
ticket-timeout: 3000
# 应用列表:配置接入的应用信息
clients:
# 应用 sso-client2采用模式三对接
sso-client2:
client: playedu-client
allow-url: "*"
secret-key: SSO-C2-kQwIOrYvnXmSDkwEiFngrKidMcdrgKor
# MyBatis-Plus配置
mybatis-plus:
configuration:
map-underscore-to-camel-case: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
db-config:
id-type: auto
logic-delete-field: deleted
logic-delete-value: 1
logic-not-delete-value: 0
spring:
datasource:
# 移除type配置使用默认的HikariCP
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${DB_HOST}:3306/video?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai
username: ${DB_USER}
password: ${DB_PASSWORD}
hikari:
maximum-pool-size: 20
minimum-idle: 5
idle-timeout: 300000
connection-timeout: 20000
max-lifetime: 1200000
main:
allow-circular-references: true # 临时允许循环依赖
cache:
type: redis # 缓存配置,这里集成了redis和ehcache两种缓存方式基本是使用redis。
ehcache:
config: classpath:config/ehcache.xml
application:
name: bpms-sso # 服务名称
cloud:
nacos:
discovery:
server-addr: http://${DB_HOST}:8848
namespace: ng
username: nacos
password: ngsk0809
config:
server-addr: http://${DB_HOST}:8848
namespace: ng
file-extension: yml
username: nacos
password: ngsk0809
import-check:
enabled: false
data:
redis:
open: true
host: ${DB_HOST} # 需替换
port: 6379 # 需替换
database: 0 # 需替换
timeout: 6000
password: ${REDIS_PASSWORD} # 需替换
lettuce:
cluster:
refresh:
adaptive: true
period: 20
shutdown-timeout: 6000ms
pool:
max-active: 20
max-idle: 10
max-wait: -1ms
min-idle: 5
template:
defaultSerializer:
org.springframework.data.redis.serializer.StringRedisSerializer
jwt:
secret: bladexisapowerfulmicroservicearchitectureupgradedandoptimizedfromacommercialproject
expiration: 3600000 # 1小时单位毫秒
tokenHead: "Bearer "