package com.emotion.controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; 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-21 */ @RestController @RequestMapping("/health") public class SimpleHealthController { @GetMapping public Map health() { Map result = new HashMap<>(); result.put("status", "UP"); result.put("service", "emotion-single"); result.put("version", "1.0.0"); result.put("timestamp", LocalDateTime.now().toString()); result.put("message", "情感博物馆单体服务运行正常"); return result; } @GetMapping("/info") public Map info() { Map result = new HashMap<>(); result.put("name", "emotion-single"); result.put("description", "情感博物馆单体服务"); result.put("version", "1.0.0"); result.put("author", "emotion-museum"); result.put("build-time", LocalDateTime.now().toString()); return result; } }