Browse Source

update 优化 CacheRequestFilter 使用枚举替换字符串

master
疯狂的狮子Li 3 years ago committed by Gitee
parent
commit
fca189fa73
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
  1. 2
      ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/CacheRequestFilter.java

2
ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/CacheRequestFilter.java

@ -54,7 +54,7 @@ public class CacheRequestFilter extends AbstractGatewayFilterFactory<CacheReques @@ -54,7 +54,7 @@ public class CacheRequestFilter extends AbstractGatewayFilterFactory<CacheReques
{
// GET DELETE 不过滤
HttpMethod method = exchange.getRequest().getMethod();
if (method == null || method.matches("GET") || method.matches("DELETE"))
if (method == null || method == HttpMethod.GET || method == HttpMethod.DELETE)
{
return chain.filter(exchange);
}

Loading…
Cancel
Save