增加个删除所有缓存接口
This commit is contained in:
parent
498e52fedd
commit
6158e1cd5b
@ -0,0 +1,27 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller;
|
||||
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.redis.lock.RedisRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/cache")
|
||||
public class CacheController {
|
||||
|
||||
@Lazy
|
||||
@Autowired
|
||||
private RedisRepository redisRepository;
|
||||
|
||||
/**
|
||||
* 删除所有缓存
|
||||
*/
|
||||
@GetMapping("/clearAll")
|
||||
public Result clearAllCache() {
|
||||
redisRepository.flushDb();
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
@ -78,6 +78,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
|
||||
http.authorizeRequests()
|
||||
//请求路径允许访问
|
||||
.antMatchers("/xmgl/cache/clearAll").permitAll()
|
||||
.antMatchers("/xmgl/videoScreenshot/captureScreenshotSync").permitAll()
|
||||
.antMatchers("/xmgl/policeCameraItemFile/*").permitAll()
|
||||
.antMatchers("/xmgl/workTicketOrderApp/*").permitAll()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user