v3.7.0 (2024-09-28) Java17+SpringBoot3重磅更新,【新增】支持Java17;【新增】支持SpringBoot3;【优化】优化AES和SM4加密;【优化】优化三级等保文档;

This commit is contained in:
zhuoda
2024-09-28 21:54:38 +08:00
parent 4362e8df8b
commit 0f719aee10
659 changed files with 42717 additions and 82 deletions

View File

@@ -0,0 +1,168 @@
spring:
# 数据库连接信息
datasource:
url: jdbc: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: SmartAdmin666
driver-class-name: com.mysql.cj.jdbc.Driver
initial-size: 10
min-idle: 10
max-active: 100
max-wait: 60000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
filters: stat
druid:
username: druid
password: 1024lab
login:
enabled: false
method:
pointcut: net.lab1024.sa..*Service.*
# redis 连接池配置信息
data:
redis:
database: 1
host: 127.0.0.1
port: 6379
password:
timeout: 10000ms
lettuce:
pool:
max-active: 100
min-idle: 10
max-idle: 50
max-wait: 30000ms
# 邮件置以SSL的方式发送, 这个需要使用这种方式并且端口是465
mail:
host: smtp.163.com
port: 465
username: lab1024@163.com
password: 1024lab
properties:
mail:
smtp:
auth: true
ssl:
enable: true
socketFactory:
class: com.sun.mail.util.MailSSLSocketFactory
fallback: false
debug: false
# 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
max-days: 30
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-hangzhou
endpoint: oss-cn-hangzhou.aliyuncs.com
bucket-name: 1024lab-smart-admin
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: 100
connect-timeout: 50000
read-timeout: 50000
write-timeout: 50000
keep-alive: 300000
# 跨域配置
access-control-allow-origin: 'https://preview.smartadmin.vip'
# 心跳配置
heart-beat:
interval-seconds: 60
# 热加载配置
reload:
interval-seconds: 60
# sa-token 配置
sa-token:
# token 名称(同时也是 cookie 名称)
token-name: x-access-token
# 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: false
# 日志等级trace、debug、info、warn、error、fatal
log-level: warn
# 启动时的字符画打印
is-print: false
# 是否从cookie读取token
is-read-cookie: false
# SmartJob 定时任务配置(不需要可以直接删除以下配置详细文档请看https://www.xxxxxx.com)
smart:
job:
enabled: true
# 任务初始化延迟 默认30秒 可选
init-delay: 10
# 定时任务执行线程池数量 默认2 可选
core-pool-size: 2
# 数据库配置检测-开关 默认开启 可选(作用是固定间隔读取数据库配置更新任务,关闭后只能重启服务或通过接口修改定时任务,建议开启)
db-refresh-enabled: true
# 数据库配置检测-执行间隔 默认120秒 可选
db-refresh-interval: 60