master
冯凯 2023-11-22 14:45:47 +08:00
parent f5d0f4e473
commit 40cca10e8b
1 changed files with 11 additions and 7 deletions

View File

@ -30,6 +30,7 @@ public class CacheRequestGatewayFilter implements GatewayFilter {
String userId = exchange.getRequest().getHeaders().getFirst(SecurityConstants.DETAILS_USER_ID); String userId = exchange.getRequest().getHeaders().getFirst(SecurityConstants.DETAILS_USER_ID);
log.info("经过公司过滤器,{}", userId); log.info("经过公司过滤器,{}", userId);
log.info("请求的uri是:{}",exchange.getRequest().getPath().toString()); log.info("请求的uri是:{}",exchange.getRequest().getPath().toString());
if ("/firm/firm/by/userId".equals(exchange.getRequest().getPath().toString())){
// GET DELETE 不过滤 // GET DELETE 不过滤
RedisService redisService = SpringUtils.getBean(RedisService.class); RedisService redisService = SpringUtils.getBean(RedisService.class);
FirmInfoCache firmInfoCache = redisService.getCacheObject("company:" + userId); FirmInfoCache firmInfoCache = redisService.getCacheObject("company:" + userId);
@ -41,4 +42,7 @@ public class CacheRequestGatewayFilter implements GatewayFilter {
} }
return chain.filter(exchange); return chain.filter(exchange);
} }
return chain.filter(exchange);
}
} }