IP白名单配置
This commit is contained in:
parent
7932d2ad31
commit
b6279cbbb7
|
|
@ -107,10 +107,10 @@ public class IpWhitelistFilter implements Filter {
|
||||||
// 定时刷新缓存(可选)
|
// 定时刷新缓存(可选)
|
||||||
@Scheduled(fixedRate = refreshTime)
|
@Scheduled(fixedRate = refreshTime)
|
||||||
public void refreshCache() {
|
public void refreshCache() {
|
||||||
log.info("开始定时刷新IP白名单缓存...");
|
// log.info("开始定时刷新IP白名单缓存...");
|
||||||
int sizeBefore = ipCache.size();
|
int sizeBefore = ipCache.size();
|
||||||
ipCache.clear();
|
ipCache.clear();
|
||||||
log.info("IP白名单缓存刷新完成,清理了 {} 个缓存条目", sizeBefore);
|
// log.info("IP白名单缓存刷新完成,清理了 {} 个缓存条目", sizeBefore);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendForbiddenResponse(HttpServletResponse response, String message) throws IOException {
|
private void sendForbiddenResponse(HttpServletResponse response, String message) throws IOException {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue