RedisRefreshController.java 911 B

123456789101112131415161718192021222324252627282930
  1. package com.lantone.message.web;
  2. import com.lantone.common.api.CommonResult;
  3. import com.lantone.message.component.MessageSender;
  4. import io.swagger.annotations.Api;
  5. import io.swagger.annotations.ApiOperation;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.web.bind.annotation.PostMapping;
  8. import org.springframework.web.bind.annotation.RestController;
  9. /**
  10. * @Description: redis刷新处理API
  11. * @author: rengb
  12. * @time: 2021/1/5 18:27
  13. */
  14. @RestController
  15. @Api(value = "redis刷新处理API", tags = { "redis刷新处理API" })
  16. public class RedisRefreshController {
  17. @Autowired
  18. private MessageSender messageSender;
  19. @ApiOperation(value = "redis刷新处理")
  20. @PostMapping("/redisRefresh")
  21. public CommonResult redisRefresh(String type) {
  22. messageSender.sendRedisCacheRefreshMessage(type);
  23. return CommonResult.success(null);
  24. }
  25. }