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

This commit is contained in:
疯狂的狮子Li
2022-05-31 02:55:17 +00:00
committed by Gitee
parent 6cda8cb28f
commit fca189fa73

View File

@@ -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);
}