liukangdong
2025-02-27 98250a7cff913563152ae8b313c7f45cc27545ba
server/system_gateway/src/main/java/com/doumee/config/CustomWebFilterConfig.java
@@ -1,6 +1,5 @@
package com.doumee.config;
import com.doumee.config.GatewayFilterProperties;
import com.doumee.config.jwt.JwtTokenUtil;
import com.doumee.core.utils.Constants;
import org.apache.commons.lang3.StringUtils;
@@ -10,7 +9,6 @@
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.server.reactive.ServerHttpResponse;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.util.AntPathMatcher;
import org.springframework.util.PathMatcher;
@@ -41,7 +39,7 @@
                if (StringUtils.isBlank(userInfo)) {
                    return unAuthorize(exchange);
                }
                jwtTokenUtil.refreshTokenTime(token,userInfo);
                jwtTokenUtil.refreshTokenTime(token);
                //把新的 exchange放回到过滤链
                ServerHttpRequest request = exchange.getRequest().mutate().header(Constants.HEADER_USER_TOKEN, token).build();
                ServerWebExchange newExchange = exchange.mutate().request(request).build();