🔧 完成前后端配置优化和部署修复

 后端配置优化:
- 优化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:
2025-07-23 18:07:20 +08:00
parent 48df1d68d7
commit 645036fcd2
13 changed files with 1142 additions and 233 deletions
@@ -10,38 +10,15 @@ spring:
profiles:
active: ${SPRING_PROFILES_ACTIVE:local}
datasource:
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: 5
maximum-pool-size: 20
auto-commit: true
idle-timeout: 30000
pool-name: EmotionHikariCP
max-lifetime: 1800000
connection-timeout: 30000
redis:
host: localhost
port: 6379
timeout: 3000ms
lettuce:
pool:
max-active: 8
max-wait: -1ms
max-idle: 8
min-idle: 0
# Jackson配置 - 所有环境统一
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
serialization:
write-dates-as-timestamps: false
default-property-inclusion: non_null
# MyBatis Plus配置
# MyBatis Plus配置 - 所有环境统一
mybatis-plus:
configuration:
map-underscore-to-camel-case: true
@@ -58,11 +35,12 @@ mybatis-plus:
banner: false
mapper-locations: classpath*:mapper/*.xml
# 日志配置
# 日志配置 - 所有环境统一
logging:
level:
com.emotion: debug
org.springframework.security: debug
com.emotion: info
org.springframework.security: warn
root: info
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n"
file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n"
@@ -71,7 +49,7 @@ logging:
max-size: 100MB
max-history: 30
# 管理端点配置
# 管理端点配置 - 所有环境统一
management:
endpoints:
web:
@@ -81,7 +59,7 @@ management:
health:
show-details: always
# 应用配置
# 应用配置 - 所有环境统一
emotion:
# JWT配置
jwt:
@@ -90,14 +68,16 @@ emotion:
header: Authorization
prefix: "Bearer "
# Coze API配置
# Coze API配置 - 所有环境统一
coze:
api:
token: your-coze-api-token
token: pat_7523042446285439016_emotion_museum_2025
base-url: https://api.coze.cn
bot-id: 7523042446285439016
workflow-id: 7523047462895796287
timeout: 30000
retry-count: 3
retry-delay: 1000
# 文件上传配置
upload:
@@ -111,5 +91,7 @@ emotion:
- /api/auth/login
- /api/auth/register
- /api/health
- /api/health/info
- /api/actuator/**
- /api/websocket/**
- /api/ai/guest/**