645036fcd2
✅ 后端配置优化: - 优化application.yml配置文件结构 - 统一Coze API配置到所有环境 - 删除重复的SimpleAuthController和SimpleHealthController - 创建独立的HealthController - 修复SASS变量未定义问题 - 优化数据库连接池配置 ✅ 前端配置修复: - 修复Vite配置中SASS变量全局导入 - 更新API代理配置指向正确端口(8080) - 解决Dashboard组件SASS变量未定义错误 ✅ 部署配置完善: - 创建详细的部署状态报告 - 优化生产环境和本地环境配置 - 修复Nginx反向代理配置 - 完善防火墙和MySQL远程连接配置 🚀 功能状态: - 前端: Vue3 + Vite开发服务器正常启动 - 后端: Spring Boot服务正常运行(8080端口) - 数据库: MySQL连接配置完善 - API: 健康检查和基础接口就绪 📊 技术改进: - 配置文件结构优化 - 开发环境和生产环境配置分离 - 前后端联调环境就绪 - 部署文档完善
59 lines
1.6 KiB
Java
59 lines
1.6 KiB
Java
package com.emotion.controller;
|
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import java.time.LocalDateTime;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
/**
|
|
* 健康检查控制器
|
|
*
|
|
* @author emotion-museum
|
|
* @date 2025-07-23
|
|
*/
|
|
@RestController
|
|
public class HealthController {
|
|
|
|
private static final Logger log = LoggerFactory.getLogger(HealthController.class);
|
|
|
|
/**
|
|
* 健康检查
|
|
*/
|
|
@GetMapping("/health")
|
|
public Map<String, Object> health() {
|
|
log.info("健康检查请求");
|
|
|
|
Map<String, Object> response = new HashMap<>();
|
|
response.put("service", "emotion-single");
|
|
response.put("message", "情感博物馆单体服务运行正常");
|
|
response.put("version", "1.0.0");
|
|
response.put("status", "UP");
|
|
response.put("timestamp", LocalDateTime.now());
|
|
|
|
return response;
|
|
}
|
|
|
|
/**
|
|
* 服务信息
|
|
*/
|
|
@GetMapping("/health/info")
|
|
public Map<String, Object> info() {
|
|
log.info("服务信息请求");
|
|
|
|
Map<String, Object> response = new HashMap<>();
|
|
response.put("service", "emotion-single");
|
|
response.put("description", "情感博物馆单体服务");
|
|
response.put("version", "1.0.0");
|
|
response.put("author", "emotion-museum");
|
|
response.put("buildTime", "2025-07-23");
|
|
response.put("javaVersion", System.getProperty("java.version"));
|
|
response.put("timestamp", LocalDateTime.now());
|
|
|
|
return response;
|
|
}
|
|
}
|