gaodm 6 vuotta sitten
vanhempi
commit
75f5f0bf77

+ 1 - 0
config-server/src/main/resources/shared/icss-service-local.yml

@@ -71,6 +71,7 @@ spring:
     password: guest
     publisher-confirms: true
     virtual-host: /
+
   #redis
   redis:
     database:

+ 29 - 0
icss-service/src/main/java/com/diagbot/web/CacheController.java

@@ -0,0 +1,29 @@
+package com.diagbot.web;
+
+import com.diagbot.dto.RespDTO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Description: 电子病历评级
+ * @Author:gaodm
+ * @time: 2019/5/22 15:07
+ */
+@RestController
+@RequestMapping("/cache")
+@Api(value = "缓存相关API", tags = { "缓存相关API" })
+@SuppressWarnings("unchecked")
+public class CacheController {
+
+    @ApiOperation(value = "清空缓存[by:gaodm]",
+            notes = "")
+    @PostMapping("/clear")
+    @CacheEvict(cacheNames = "tagCache", allEntries = true)
+    public RespDTO<Boolean> getIntroduceByEMR() {
+        return RespDTO.onSuc(true);
+    }
+}