Pārlūkot izejas kodu

RedisRefreshController入参添加注解

songxinlu 3 gadi atpakaļ
vecāks
revīzija
288b494984

+ 2 - 1
message-service/src/main/java/com/lantone/message/web/RedisRefreshController.java

@@ -6,6 +6,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
@@ -22,7 +23,7 @@ public class RedisRefreshController {
 
     @ApiOperation(value = "redis刷新处理")
     @PostMapping("/redisRefresh")
-    public CommonResult redisRefresh(String type) {
+    public CommonResult redisRefresh(@RequestBody String type) {
         messageSender.sendRedisCacheRefreshMessage(type);
         return CommonResult.success(null);
     }