|
|
@@ -23,7 +23,6 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springblade.common.cache.CacheNames;
|
|
|
-import org.springblade.core.cache.constant.CacheConstant;
|
|
|
import org.springblade.core.cache.utils.CacheUtil;
|
|
|
import org.springblade.core.jwt.JwtUtil;
|
|
|
import org.springblade.core.jwt.props.JwtProperties;
|
|
|
@@ -48,6 +47,8 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
import java.time.Duration;
|
|
|
import java.util.UUID;
|
|
|
|
|
|
+import static org.springblade.core.cache.constant.CacheConstant.*;
|
|
|
+
|
|
|
/**
|
|
|
* 令牌端点
|
|
|
*
|
|
|
@@ -122,15 +123,16 @@ public class BladeTokenEndPoint {
|
|
|
@GetMapping("/oauth/clear-cache")
|
|
|
@ApiOperation(value = "清除缓存")
|
|
|
public Kv clearCache() {
|
|
|
- CacheUtil.clear(CacheConstant.BIZ_CACHE);
|
|
|
- CacheUtil.clear(CacheConstant.USER_CACHE);
|
|
|
- CacheUtil.clear(CacheConstant.DICT_CACHE);
|
|
|
- CacheUtil.clear(CacheConstant.FLOW_CACHE);
|
|
|
- CacheUtil.clear(CacheConstant.SYS_CACHE);
|
|
|
- CacheUtil.clear(CacheConstant.PARAM_CACHE);
|
|
|
- CacheUtil.clear(CacheConstant.RESOURCE_CACHE);
|
|
|
- CacheUtil.clear(CacheConstant.MENU_CACHE);
|
|
|
- CacheUtil.clear(CacheConstant.MENU_CACHE, Boolean.FALSE);
|
|
|
+ CacheUtil.clear(BIZ_CACHE);
|
|
|
+ CacheUtil.clear(USER_CACHE);
|
|
|
+ CacheUtil.clear(DICT_CACHE);
|
|
|
+ CacheUtil.clear(FLOW_CACHE);
|
|
|
+ CacheUtil.clear(SYS_CACHE);
|
|
|
+ CacheUtil.clear(PARAM_CACHE);
|
|
|
+ CacheUtil.clear(RESOURCE_CACHE);
|
|
|
+ CacheUtil.clear(MENU_CACHE);
|
|
|
+ CacheUtil.clear(MENU_CACHE, Boolean.FALSE);
|
|
|
+ CacheUtil.clear(PARAM_CACHE, Boolean.FALSE);
|
|
|
return Kv.create().set("success", "true").set("msg", "success");
|
|
|
}
|
|
|
}
|