|
@@ -64,22 +64,29 @@ public class HolidayTestController {
|
|
|
@ApiOperation("节日服务健康检查")
|
|
|
public Map<String, Object> healthCheck() {
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
-
|
|
|
+
|
|
|
try {
|
|
|
+ log.info("开始节日服务健康检查,实际请求路径: /manager/platform/holidayCalendar/isHoliday");
|
|
|
+
|
|
|
boolean isHoliday = holidayService.isTodayHoliday();
|
|
|
result.put("status", "healthy");
|
|
|
result.put("service", "holiday-service");
|
|
|
+ result.put("context_path_info", "manager服务使用context-path=/manager");
|
|
|
+ result.put("feign_path", "/manager/platform/holidayCalendar/isHoliday");
|
|
|
result.put("timestamp", System.currentTimeMillis());
|
|
|
result.put("test_result", isHoliday ? "有节日数据" : "无节日数据");
|
|
|
-
|
|
|
+
|
|
|
} catch (Exception e) {
|
|
|
- log.error("节日服务健康检查失败", e);
|
|
|
+ log.error("节日服务健康检查失败,请检查context-path配置", e);
|
|
|
result.put("status", "unhealthy");
|
|
|
result.put("service", "holiday-service");
|
|
|
+ result.put("context_path_info", "manager服务使用context-path=/manager");
|
|
|
+ result.put("feign_path", "/manager/platform/holidayCalendar/isHoliday");
|
|
|
result.put("timestamp", System.currentTimeMillis());
|
|
|
result.put("error", e.getMessage());
|
|
|
+ result.put("troubleshooting", "检查Feign客户端path是否包含/manager前缀");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return result;
|
|
|
}
|
|
|
|