2025-10-21 16:50:33 +08:00
|
|
|
|
spring.application.name=demo
|
|
|
|
|
|
spring.messages.basename=messages
|
|
|
|
|
|
spring.thymeleaf.cache=false
|
2026-01-05 15:40:28 +08:00
|
|
|
|
spring.profiles.active=prod
|
2025-10-23 10:40:57 +08:00
|
|
|
|
|
|
|
|
|
|
# 服务器配置
|
2025-11-13 17:01:39 +08:00
|
|
|
|
server.address=0.0.0.0
|
2025-10-23 10:40:57 +08:00
|
|
|
|
server.port=8080
|
2025-10-27 10:46:49 +08:00
|
|
|
|
|
2025-11-07 19:09:50 +08:00
|
|
|
|
# 文件上传配置(扩大请求体大小以支持大图片Base64编码)
|
|
|
|
|
|
spring.servlet.multipart.max-file-size=500MB
|
|
|
|
|
|
spring.servlet.multipart.max-request-size=600MB
|
2025-10-27 10:46:49 +08:00
|
|
|
|
spring.servlet.multipart.enabled=true
|
2025-11-07 19:09:50 +08:00
|
|
|
|
# Tomcat 最大POST大小
|
|
|
|
|
|
server.tomcat.max-http-post-size=600MB
|
2025-10-27 10:46:49 +08:00
|
|
|
|
|
2025-12-05 09:57:09 +08:00
|
|
|
|
# JPA配置 - 禁用open-in-view避免视图层执行SQL查询
|
|
|
|
|
|
spring.jpa.open-in-view=false
|
2025-12-20 15:24:58 +08:00
|
|
|
|
# JPA自动更新表结构
|
|
|
|
|
|
spring.jpa.hibernate.ddl-auto=update
|
|
|
|
|
|
spring.jpa.show-sql=false
|
2025-12-05 09:57:09 +08:00
|
|
|
|
|
2025-12-08 13:54:02 +08:00
|
|
|
|
# HikariCP连接池配置
|
|
|
|
|
|
# 连接泄漏检测阈值(毫秒),设置为0禁用检测,避免长时间任务触发误报
|
|
|
|
|
|
spring.datasource.hikari.leak-detection-threshold=0
|
|
|
|
|
|
# 最大连接池大小
|
|
|
|
|
|
spring.datasource.hikari.maximum-pool-size=20
|
|
|
|
|
|
# 最小空闲连接数
|
|
|
|
|
|
spring.datasource.hikari.minimum-idle=5
|
|
|
|
|
|
# 连接超时(毫秒)
|
|
|
|
|
|
spring.datasource.hikari.connection-timeout=30000
|
|
|
|
|
|
# 空闲连接超时(毫秒)
|
|
|
|
|
|
spring.datasource.hikari.idle-timeout=600000
|
|
|
|
|
|
# 连接最大存活时间(毫秒)
|
|
|
|
|
|
spring.datasource.hikari.max-lifetime=1800000
|
|
|
|
|
|
|
2025-10-27 10:46:49 +08:00
|
|
|
|
# 应用配置
|
|
|
|
|
|
app.upload.path=uploads
|
|
|
|
|
|
app.video.output.path=outputs
|
|
|
|
|
|
|
|
|
|
|
|
# JWT配置
|
2026-01-06 14:33:01 +08:00
|
|
|
|
jwt.secret=mySecretKey123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
|
|
|
|
|
|
jwt.expiration=2592000000
|
2025-10-27 10:46:49 +08:00
|
|
|
|
|
2025-12-11 13:32:24 +08:00
|
|
|
|
# ============================================
|
|
|
|
|
|
# Redis配置
|
|
|
|
|
|
# ============================================
|
|
|
|
|
|
# 是否启用Redis缓存(设置为false则禁用Redis,Token验证仅依赖JWT)
|
|
|
|
|
|
redis.enabled=false
|
|
|
|
|
|
spring.data.redis.host=localhost
|
|
|
|
|
|
spring.data.redis.port=6379
|
|
|
|
|
|
spring.data.redis.password=
|
|
|
|
|
|
spring.data.redis.database=0
|
|
|
|
|
|
# 连接池配置
|
|
|
|
|
|
spring.data.redis.lettuce.pool.max-active=8
|
|
|
|
|
|
spring.data.redis.lettuce.pool.max-idle=8
|
|
|
|
|
|
spring.data.redis.lettuce.pool.min-idle=0
|
|
|
|
|
|
spring.data.redis.lettuce.pool.max-wait=-1ms
|
|
|
|
|
|
# Token在Redis中的过期时间(秒),与JWT过期时间一致
|
|
|
|
|
|
redis.token.expire-seconds=86400
|
|
|
|
|
|
# 禁用Redis自动配置(当redis.enabled=false时生效)
|
|
|
|
|
|
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration,org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration
|
|
|
|
|
|
|
2025-10-27 10:46:49 +08:00
|
|
|
|
# AI API配置
|
|
|
|
|
|
ai.api.base-url=http://116.62.4.26:8081
|
2025-12-20 15:24:58 +08:00
|
|
|
|
ai.api.key=sk-J9A9c7rr7Y2suarAudmLG1J722ozIIHOweIhsI8QXX68sjMW
|
2025-11-13 17:01:39 +08:00
|
|
|
|
|
|
|
|
|
|
# SpringDoc OpenAPI (Swagger) 配置
|
|
|
|
|
|
springdoc.api-docs.path=/v3/api-docs
|
|
|
|
|
|
springdoc.swagger-ui.path=/swagger-ui.html
|
|
|
|
|
|
springdoc.swagger-ui.operationsSorter=method
|
|
|
|
|
|
springdoc.swagger-ui.tagsSorter=alpha
|
|
|
|
|
|
springdoc.swagger-ui.tryItOutEnabled=true
|
|
|
|
|
|
springdoc.swagger-ui.filter=true
|
|
|
|
|
|
springdoc.swagger-ui.display-request-duration=true
|
|
|
|
|
|
springdoc.swagger-ui.doc-expansion=none
|
|
|
|
|
|
springdoc.swagger-ui.default-models-expand-depth=1
|
|
|
|
|
|
springdoc.swagger-ui.default-model-expand-depth=1
|
2025-11-21 16:10:00 +08:00
|
|
|
|
|
|
|
|
|
|
# 腾讯云COS对象存储配置
|
|
|
|
|
|
# 是否启用COS(设置为true后需要配置下面的参数)
|
2025-12-05 21:06:16 +08:00
|
|
|
|
tencent.cos.enabled=true
|
2025-11-21 16:10:00 +08:00
|
|
|
|
# 腾讯云SecretId(从控制台获取:https://console.cloud.tencent.com/cam/capi)
|
2025-12-05 21:06:16 +08:00
|
|
|
|
tencent.cos.secret-id=AKID2xjaRPSOSYk2fIxV7nQuDi9NOIzTjlbJ
|
2025-11-21 16:10:00 +08:00
|
|
|
|
# 腾讯云SecretKey
|
2025-12-05 21:06:16 +08:00
|
|
|
|
tencent.cos.secret-key=Xrxywju0wfAf3QiqlT2ZvGYgeS6WjnjT
|
2025-11-21 16:10:00 +08:00
|
|
|
|
# COS区域(例如:ap-guangzhou、ap-shanghai、ap-beijing等)
|
2025-12-05 21:06:16 +08:00
|
|
|
|
tencent.cos.region=ap-nanjing
|
2025-11-21 16:10:00 +08:00
|
|
|
|
# COS存储桶名称(例如:my-bucket-1234567890)
|
2025-12-05 21:06:16 +08:00
|
|
|
|
tencent.cos.bucket-name=test-1323844400
|
2025-12-08 13:54:02 +08:00
|
|
|
|
# COS文件夹前缀(所有文件存储在此目录下)
|
|
|
|
|
|
tencent.cos.prefix=test-sx
|
2025-11-21 16:10:00 +08:00
|
|
|
|
|
2025-12-05 09:57:09 +08:00
|
|
|
|
# ============================================
|
|
|
|
|
|
# PayPal支付配置
|
|
|
|
|
|
# ============================================
|
|
|
|
|
|
# 注意:请将实际的PayPal凭证配置到 application-dev.properties 中
|
|
|
|
|
|
# 该文件已在.gitignore中,不会被提交到版本控制
|
|
|
|
|
|
# PayPal Client ID(请在application-dev.properties中配置)
|
|
|
|
|
|
paypal.client-id=
|
|
|
|
|
|
# PayPal Client Secret(请在application-dev.properties中配置)
|
|
|
|
|
|
paypal.client-secret=
|
|
|
|
|
|
# PayPal模式:sandbox(测试环境) 或 live(生产环境)
|
|
|
|
|
|
paypal.mode=sandbox
|
|
|
|
|
|
# 支付成功回调URL
|
|
|
|
|
|
paypal.success-url=https://vionow.com/api/payment/paypal/success
|
|
|
|
|
|
# 支付取消回调URL
|
|
|
|
|
|
paypal.cancel-url=https://vionow.com/api/payment/paypal/cancel
|
|
|
|
|
|
|
2025-12-08 13:54:02 +08:00
|
|
|
|
# ============================================
|
|
|
|
|
|
# GZIP 压缩配置(提升传输性能)
|
|
|
|
|
|
# ============================================
|
|
|
|
|
|
server.compression.enabled=true
|
|
|
|
|
|
server.compression.mime-types=text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml
|
|
|
|
|
|
server.compression.min-response-size=1024
|
|
|
|
|
|
|
|
|
|
|
|
# ============================================
|
|
|
|
|
|
# 日志配置
|
|
|
|
|
|
# ============================================
|
|
|
|
|
|
# 关闭 Spring Security DEBUG 日志
|
|
|
|
|
|
logging.level.org.springframework.security=INFO
|
|
|
|
|
|
# 减少 Tomcat HTTP 解析错误日志(扫描器/HTTPS误连等导致的)
|
|
|
|
|
|
logging.level.org.apache.coyote.http11.Http11Processor=ERROR
|
2025-12-20 15:24:58 +08:00
|
|
|
|
logging.level.org.apache.coyote.AbstractProtocol=ERROR
|