2025-06-11 14:45:40 +08:00
|
|
|
|
# 公共配置文件
|
|
|
|
|
|
# @author <a href="https://github.com/liyupi">程序员鱼皮</a>
|
|
|
|
|
|
# @from <a href="https://yupi.icu">编程导航知识星球</a>
|
|
|
|
|
|
spring:
|
|
|
|
|
|
application:
|
|
|
|
|
|
name: springboot-init
|
|
|
|
|
|
# 默认 dev 环境
|
|
|
|
|
|
profiles:
|
2025-07-01 16:57:18 +08:00
|
|
|
|
active: dev
|
2025-06-11 14:45:40 +08:00
|
|
|
|
# 支持 swagger3
|
|
|
|
|
|
mvc:
|
|
|
|
|
|
pathmatch:
|
|
|
|
|
|
matching-strategy: ant_path_matcher
|
|
|
|
|
|
# session 配置
|
|
|
|
|
|
session:
|
|
|
|
|
|
# todo 取消注释开启分布式 session(须先配置 Redis)
|
|
|
|
|
|
# store-type: redis
|
|
|
|
|
|
# 30 天过期
|
|
|
|
|
|
timeout: 2592000
|
|
|
|
|
|
# 数据库配置
|
|
|
|
|
|
# todo 需替换配置
|
|
|
|
|
|
datasource:
|
|
|
|
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
|
|
|
url: jdbc:mysql://localhost:3306/my_db
|
|
|
|
|
|
username: root
|
|
|
|
|
|
password: 123asd
|
|
|
|
|
|
jackson:
|
2025-06-26 17:39:43 +08:00
|
|
|
|
# date-format: yyyy-MM-dd HH:mm:ss
|
|
|
|
|
|
serialization:
|
|
|
|
|
|
write-dates-as-timestamps: true # 设置 Date 的格式,使用时间戳
|
|
|
|
|
|
write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
|
|
|
|
|
|
write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
|
|
|
|
|
|
fail-on-empty-beans: false # 允许序列化无属性的 Bean
|
2025-06-11 14:45:40 +08:00
|
|
|
|
servlet:
|
|
|
|
|
|
multipart:
|
|
|
|
|
|
# 大小限制
|
|
|
|
|
|
max-file-size: 10MB
|
|
|
|
|
|
server:
|
|
|
|
|
|
address: 0.0.0.0
|
|
|
|
|
|
port: 8101
|
|
|
|
|
|
servlet:
|
|
|
|
|
|
context-path: /api
|
|
|
|
|
|
# cookie 30 天过期
|
|
|
|
|
|
session:
|
|
|
|
|
|
cookie:
|
|
|
|
|
|
max-age: 2592000
|
|
|
|
|
|
mybatis-plus:
|
|
|
|
|
|
configuration:
|
|
|
|
|
|
map-underscore-to-camel-case: false
|
2025-06-20 20:15:06 +08:00
|
|
|
|
log-impl: org.apache.ibatis.logging.log4j2.Log4j2Impl
|
2025-06-11 18:19:40 +08:00
|
|
|
|
log-sql:
|
2025-07-18 15:20:56 +08:00
|
|
|
|
default-executor-type: simple
|
2025-06-11 14:45:40 +08:00
|
|
|
|
global-config:
|
|
|
|
|
|
db-config:
|
|
|
|
|
|
logic-delete-field: isDelete # 全局逻辑删除的实体字段名
|
|
|
|
|
|
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
|
|
|
|
|
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
2025-06-26 17:39:43 +08:00
|
|
|
|
# 微信相关·
|
|
|
|
|
|
# Jackson 配置项
|
2025-06-11 14:45:40 +08:00
|
|
|
|
wx:
|
|
|
|
|
|
# 微信公众平台
|
|
|
|
|
|
# todo 需替换配置
|
|
|
|
|
|
mp:
|
|
|
|
|
|
token: xxx
|
|
|
|
|
|
aesKey: xxx
|
|
|
|
|
|
appId: xxx
|
|
|
|
|
|
secret: xxx
|
|
|
|
|
|
config-storage:
|
|
|
|
|
|
http-client-type: HttpClient
|
|
|
|
|
|
key-prefix: wx
|
|
|
|
|
|
redis:
|
|
|
|
|
|
host: 127.0.0.1
|
|
|
|
|
|
port: 6379
|
|
|
|
|
|
type: Memory
|
|
|
|
|
|
# 微信开放平台
|
|
|
|
|
|
# todo 需替换配置
|
|
|
|
|
|
open:
|
|
|
|
|
|
appId: xxx
|
|
|
|
|
|
appSecret: xxx
|
|
|
|
|
|
# 对象存储
|
|
|
|
|
|
# todo 需替换配置
|
|
|
|
|
|
cos:
|
|
|
|
|
|
client:
|
|
|
|
|
|
accessKey: xxx
|
|
|
|
|
|
secretKey: xxx
|
|
|
|
|
|
region: xxx
|
|
|
|
|
|
bucket: xxx
|
|
|
|
|
|
# 接口文档配置
|
2025-07-03 15:25:33 +08:00
|
|
|
|
|
2025-06-12 13:31:52 +08:00
|
|
|
|
|
|
|
|
|
|
############## Sa-Token 配置 (文档: https://sa-token.cc) ##############
|
|
|
|
|
|
sa-token:
|
|
|
|
|
|
# token 名称(同时也是 cookie 名称)
|
|
|
|
|
|
token-name: vvtoken
|
|
|
|
|
|
# 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)
|
2025-06-12 14:27:11 +08:00
|
|
|
|
token-style: random-128
|
2025-06-12 13:31:52 +08:00
|
|
|
|
# 是否输出操作日志
|
|
|
|
|
|
is-log: true
|
|
|
|
|
|
|
2025-06-25 21:55:49 +08:00
|
|
|
|
|
2025-06-12 13:31:52 +08:00
|
|
|
|
md5:
|
2025-08-25 14:28:17 +08:00
|
|
|
|
salt: (-FhqvXO,wMz
|
|
|
|
|
|
|
|
|
|
|
|
ai_log_path: /test/ai_log/
|