# 生产环境配置 spring.h2.console.enabled=false # MySQL DataSource (PROD) - 使用环境变量 spring.datasource.url=jdbc:mysql://mysql:3306/aigc_platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver spring.datasource.username= aigc_user spring.datasource.password= jRbHPZbbkdm24yTT # 数据库连接池配置 (生产环境 - 支持50人并发) spring.datasource.hikari.maximum-pool-size=30 spring.datasource.hikari.minimum-idle=5 spring.datasource.hikari.idle-timeout=300000 spring.datasource.hikari.max-lifetime=1200000 spring.datasource.hikari.connection-timeout=30000 spring.datasource.hikari.leak-detection-threshold=60000 spring.datasource.hikari.validation-timeout=3000 spring.datasource.hikari.connection-test-query=SELECT 1 # 生产环境:使用 update 模式自动创建/更新表结构(首次部署) # 部署完成后可改为 validate 模式以提高安全性 spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=false spring.jpa.properties.hibernate.format_sql=false # 禁用 SQL 脚本自动运行 spring.sql.init.mode=never # Thymeleaf 可启用缓存 spring.thymeleaf.cache=true # AI API配置 (生产环境) # 文生视频、图生视频、分镜视频都使用Comfly API ai.api.base-url=${AI_API_BASE_URL:https://ai.comfly.chat} ai.api.key=${AI_API_KEY} # 文生图使用Comfly API ai.image.api.base-url=${AI_IMAGE_API_BASE_URL:https://ai.comfly.chat} ai.image.api.key=${AI_IMAGE_API_KEY} # 支付宝配置 (生产环境) alipay.app-id=${ALIPAY_APP_ID} alipay.private-key=${ALIPAY_PRIVATE_KEY} alipay.public-key=${ALIPAY_PUBLIC_KEY} alipay.gateway-url=https://openapi.alipay.com/gateway.do alipay.charset=UTF-8 alipay.sign-type=RSA2 alipay.domain=${ALIPAY_DOMAIN:https://vionow.com} alipay.notify-url=${ALIPAY_NOTIFY_URL:https://vionow.com/api/payments/alipay/notify} alipay.return-url=${ALIPAY_RETURN_URL:https://vionow.com/payment/success} # JWT配置 - 使用环境变量 jwt.secret=${JWT_SECRET} jwt.expiration=${JWT_EXPIRATION:604800000} # 腾讯云SES配置 (生产环境) tencent.ses.secret-id=${TENCENT_SES_SECRET_ID} tencent.ses.secret-key=${TENCENT_SES_SECRET_KEY} tencent.ses.region=ap-hongkong tencent.ses.from-email=${TENCENT_SES_FROM_EMAIL} tencent.ses.from-name=AIGC平台 # 邮件模板ID(在腾讯云SES控制台创建模板后获取) # 如果未配置或为0,将使用开发模式(仅记录日志) tencent.ses.template-id=${TENCENT_SES_TEMPLATE_ID} # Tomcat线程池配置 (生产环境 - 支持50人并发) server.tomcat.threads.max=150 server.tomcat.threads.min-spare=20 server.tomcat.max-connections=500 server.tomcat.accept-count=100 server.tomcat.connection-timeout=20000 # 生产环境日志配置 logging.level.root=INFO logging.level.com.example.demo=INFO logging.level.org.springframework.security=WARN logging.file.name=${LOG_FILE_PATH:./logs/application.log} logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n # 视频处理配置 # 临时文件目录(相对路径:基于应用运行目录,或绝对路径) # 生产环境建议使用绝对路径,如:/app/temp 或 C:\app\temp app.temp.dir=${TEMP_DIR:./temp} # FFmpeg路径(如果FFmpeg在PATH中,使用 "ffmpeg",否则使用完整路径) # 生产环境建议使用完整路径,如:/usr/bin/ffmpeg 或 C:\ffmpeg\bin\ffmpeg.exe app.ffmpeg.path=${FFMPEG_PATH:ffmpeg} # 文件上传配置 # 上传文件保存目录(相对路径:基于应用运行目录,或绝对路径) # 生产环境建议使用绝对路径,如:/app/uploads 或 C:\app\uploads # 注意:确保应用有读写权限 app.upload.path=${UPLOAD_PATH:./uploads} # SpringDoc OpenAPI (Swagger) 配置 # 生产环境建议禁用或限制访问 springdoc.api-docs.path=/v3/api-docs springdoc.swagger-ui.path=/swagger-ui.html springdoc.swagger-ui.enabled=true 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