|
|
@ -24,8 +24,9 @@ public class IpAccessInterceptor implements HandlerInterceptor { |
|
|
|
Set<String> cacheSet = RedisUtils.getCacheSet(Constants.BLACK_IP_LIST); |
|
|
|
if (cacheSet.contains(ip)) { |
|
|
|
// 在黑名单中直接拒绝访问 |
|
|
|
log.info("ip:{} 在黑名单中拒绝访问.....", ip); |
|
|
|
return false; |
|
|
|
// log.info("ip:{} 在黑名单中拒绝访问.....", ip); |
|
|
|
throw new RuntimeException(ip+"黑名单中拒绝访问"); |
|
|
|
// return false; |
|
|
|
} |
|
|
|
|
|
|
|
// 验证通过 |
|
|
|