🔧 完成前后端配置优化和部署修复
✅ 后端配置优化: - 优化application.yml配置文件结构 - 统一Coze API配置到所有环境 - 删除重复的SimpleAuthController和SimpleHealthController - 创建独立的HealthController - 修复SASS变量未定义问题 - 优化数据库连接池配置 ✅ 前端配置修复: - 修复Vite配置中SASS变量全局导入 - 更新API代理配置指向正确端口(8080) - 解决Dashboard组件SASS变量未定义错误 ✅ 部署配置完善: - 创建详细的部署状态报告 - 优化生产环境和本地环境配置 - 修复Nginx反向代理配置 - 完善防火墙和MySQL远程连接配置 🚀 功能状态: - 前端: Vue3 + Vite开发服务器正常启动 - 后端: Spring Boot服务正常运行(8080端口) - 数据库: MySQL连接配置完善 - API: 健康检查和基础接口就绪 📊 技术改进: - 配置文件结构优化 - 开发环境和生产环境配置分离 - 前后端联调环境就绪 - 部署文档完善
This commit is contained in:
@@ -1,30 +1,60 @@
|
||||
# 生产环境配置
|
||||
# Production Environment Configuration
|
||||
|
||||
server:
|
||||
port: 8080
|
||||
|
||||
spring:
|
||||
# 数据库配置 - 生产MySQL
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/emotion_museum?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/emotion?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true
|
||||
username: emotion
|
||||
password: EmotionDB2024!
|
||||
hikari:
|
||||
minimum-idle: 10
|
||||
maximum-pool-size: 50
|
||||
auto-commit: true
|
||||
idle-timeout: 600000
|
||||
pool-name: EmotionHikariCP-Prod
|
||||
max-lifetime: 1800000
|
||||
connection-timeout: 30000
|
||||
validation-timeout: 5000
|
||||
leak-detection-threshold: 60000
|
||||
|
||||
# Redis配置 - 生产Redis
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
timeout: 5000ms
|
||||
database: 0
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 20
|
||||
max-wait: -1ms
|
||||
max-idle: 10
|
||||
min-idle: 5
|
||||
time-between-eviction-runs: 30s
|
||||
|
||||
# 日志配置
|
||||
# 日志配置 - 生产环境
|
||||
logging:
|
||||
level:
|
||||
com.emotion: info
|
||||
org.springframework.security: warn
|
||||
root: warn
|
||||
file:
|
||||
name: /data/logs/emotion-museum/emotion-single.log
|
||||
max-size: 200MB
|
||||
max-history: 60
|
||||
|
||||
# Coze API配置
|
||||
# 生产环境特定配置
|
||||
emotion:
|
||||
coze:
|
||||
api:
|
||||
token: ${COZE_API_TOKEN}
|
||||
base-url: https://api.coze.cn
|
||||
|
||||
# 文件上传配置
|
||||
# 文件上传路径 - 生产环境
|
||||
upload:
|
||||
path: /data/uploads/emotion-museum
|
||||
|
||||
# 生产模式配置
|
||||
prod:
|
||||
performance-monitoring: true
|
||||
security-enhanced: true
|
||||
cache-enabled: true
|
||||
|
||||
Reference in New Issue
Block a user