浏览代码

bug处理

zhoutg 4 年之前
父节点
当前提交
8a2f304c10
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/main/java/com/diagbot/web/CacheController.java

+ 4 - 0
src/main/java/com/diagbot/web/CacheController.java

@@ -5,6 +5,7 @@ import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.CacheFacade;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
 @RestController
 @SuppressWarnings("unchecked")
 @Api(value = "缓存API", tags = { "缓存API" })
+@Slf4j
 public class CacheController {
 
     @Autowired
@@ -109,8 +111,10 @@ public class CacheController {
         // 加载大数据缓存
         boolean flag = cacheFacade.reloadPushDB();
         if (flag) {
+            log.error("加载大数据缓存成功");
             return RespDTO.onSuc(flag);
         } else {
+            log.error("加载大数据缓存失败");
             return RespDTO.onError("加载知识库缓存成功,加载大数据缓存失败");
         }
     }