This commit is contained in:
zhuoda
2024-01-08 19:52:39 +08:00
parent 8dc663d885
commit 192e959d14
1126 changed files with 13783 additions and 68273 deletions

View File

@@ -0,0 +1,145 @@
spring:
# 数据库连接信息
datasource:
url: jdbc:p6spy:mysql://127.0.0.1:3306/smart_admin_v3?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
username: root
password: Java@1024
initial-size: 2
min-idle: 2
max-active: 10
max-wait: 60000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
filters: stat
druid:
username: druid
password: 1024
login:
enabled: false
method:
pointcut: net.lab1024.sa..*Service.*
# redis 连接池配置信息
redis:
database: 1
host: 127.0.0.1
port: 6379
password:
timeout: 10000ms
lettuce:
pool:
max-active: 5
min-idle: 1
max-idle: 3
max-wait: 30000ms
# 上传文件大小配置
servlet:
multipart:
max-file-size: 30MB
max-request-size: 30MB
# json序列化相关配置
jackson:
serialization:
write-enums-using-to-string: true
write-dates-as-timestamps: false
deserialization:
read-enums-using-to-string: true
fail-on-unknown-properties: false
default-property-inclusion: always
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
# 缓存实现类型
cache:
type: caffeine
# tomcat 配置,主要用于 配置 访问日志(便于将来排查错误)
server:
tomcat:
basedir: ${project.log-directory}/tomcat-logs
accesslog:
enabled: true
pattern: "%t %{X-Forwarded-For}i %a %r %s (%D ms) %I (%B byte)"
# 文件上传 配置
file:
storage:
mode: local
local:
upload-path: /home/smart_admin_v3/upload/ #文件上传目录
url-prefix:
cloud:
region: oss-cn-qingdao
endpoint: oss-cn-qingdao.aliyuncs.com
bucket-name: common
access-key:
secret-key:
url-prefix: https://${file.storage.cloud.bucket-name}.${file.storage.cloud.endpoint}/
private-url-expire-seconds: 3600
# open api配置
springdoc:
swagger-ui:
enabled: true # 开关
doc-expansion: none #关闭展开
tags-sorter: alpha
api-docs:
enabled: true # 开关
knife4j:
enable: true
basic:
enable: true
username: api # Basic认证用户名
password: 1024 # Basic认证密码
# RestTemplate 请求配置
http:
pool:
max-total: 20
connect-timeout: 50000
read-timeout: 50000
write-timeout: 50000
keep-alive: 300000
# 跨域配置
access-control-allow-origin: '*'
# 心跳配置
heart-beat:
interval-seconds: 300
# 热加载配置
reload:
interval-seconds: 300
# sa-token 配置
sa-token:
# token 名称(同时也是 cookie 名称)
token-name: x-access-token
# token 前缀 例如Bear
token-prefix:
# token 有效期(单位:秒) 默认30天2592000秒-1 代表永久有效
timeout: 2592000
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
active-timeout: -1
# 是否允许同一账号多地同时登录 (为 true 时允许一起登录, 为 false 时新登录挤掉旧登录)
is-concurrent: false
# 在多人登录同一账号时,是否共用一个 token (为 true 时所有登录共用一个 token, 为 false 时每次登录新建一个 token(jwt模式下恒false)
is-share: false
# token 风格默认可取值uuid、simple-uuid、random-32、random-64、random-128、tik(jwt模式下无用)
token-style: simple-uuid
# 是否打开自动续签 如果此值为true框架会在每次直接或间接调用 getLoginId() 时进行一次过期检查与续签操作)
auto-renew: true
# 是否输出操作日志
is-log: true
# 日志等级trace、debug、info、warn、error、fatal
log-level: debug
# 启动时的字符画打印
is-print: false
# 是否从cookie读取token
is-read-cookie: false