105 lines
2.4 KiB
YAML
105 lines
2.4 KiB
YAML
# ================================
|
|
# 开发环境配置
|
|
# ================================
|
|
|
|
spring:
|
|
# 数据源配置
|
|
datasource:
|
|
url: jdbc:mysql://localhost:3306/design_hub?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
|
|
username: root
|
|
password: 123456 # 请修改为您的本地 MySQL 密码
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
|
# 连接池配置
|
|
hikari:
|
|
minimum-idle: 5
|
|
maximum-pool-size: 20
|
|
connection-timeout: 30000
|
|
idle-timeout: 600000
|
|
max-lifetime: 1800000
|
|
|
|
# Redis 配置
|
|
redis:
|
|
host: localhost
|
|
port: 6379
|
|
password: # 本地开发如果没有密码,留空
|
|
database: 0
|
|
timeout: 3000
|
|
lettuce:
|
|
pool:
|
|
max-active: 8
|
|
max-wait: -1
|
|
max-idle: 8
|
|
min-idle: 0
|
|
|
|
# 文件上传配置
|
|
servlet:
|
|
multipart:
|
|
enabled: true
|
|
max-file-size: 500MB
|
|
max-request-size: 500MB
|
|
|
|
# JWT 配置
|
|
jwt:
|
|
secret: DesignHub_Dev_Secret_Key_2025 # 开发环境密钥
|
|
access-token-expiration: 7200000 # 2小时
|
|
refresh-token-expiration: 604800000 # 7天
|
|
|
|
# 服务器配置
|
|
server:
|
|
port: 8080
|
|
servlet:
|
|
context-path: /
|
|
encoding:
|
|
charset: UTF-8
|
|
enabled: true
|
|
force: true
|
|
# Tomcat 配置(支持大文件上传)
|
|
tomcat:
|
|
max-http-form-post-size: 524288000 # 500MB
|
|
max-swallow-size: 524288000 # 500MB
|
|
connection-timeout: 600000 # 10分钟超时
|
|
|
|
# 日志配置
|
|
logging:
|
|
level:
|
|
root: INFO
|
|
com.designhub: DEBUG # 开发环境显示详细日志
|
|
org.springframework.web: DEBUG
|
|
org.springframework.security: DEBUG
|
|
pattern:
|
|
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n'
|
|
|
|
# 文件存储配置
|
|
file:
|
|
upload:
|
|
# 本地开发路径(项目目录下)
|
|
path: ./uploads
|
|
max-size: 524288000 # 500MB
|
|
allowed-extensions: .xls,.xlsx,.doc,.docx,.pdf,.zip
|
|
|
|
# MyBatis Plus 配置
|
|
mybatis-plus:
|
|
configuration:
|
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 打印 SQL
|
|
map-underscore-to-camel-case: true # 开启下划线转驼峰映射
|
|
global-config:
|
|
db-config:
|
|
# 禁用逻辑删除功能
|
|
logic-delete-field: ""
|
|
logic-delete-value: 1
|
|
logic-not-delete-value: 0
|
|
|
|
# Swagger 配置(开发环境启用)
|
|
springdoc:
|
|
swagger-ui:
|
|
enabled: true
|
|
path: /swagger-ui.html
|
|
api-docs:
|
|
enabled: true
|
|
|
|
analytics:
|
|
task-progress:
|
|
snapshot:
|
|
enabled: true
|