|
3 | 3 | import cn.dev33.satoken.exception.NotLoginException;
|
4 | 4 | import cn.dev33.satoken.stp.StpUtil;
|
5 | 5 | import com.alibaba.cloud.commons.lang.StringUtils;
|
6 |
| -import com.alibaba.nacos.api.NacosFactory; |
7 |
| -import com.alibaba.nacos.api.config.ConfigService; |
| 6 | + |
8 | 7 | import io.github.common.logger.CommonLogger;
|
9 | 8 | import lombok.Data;
|
10 | 9 | import lombok.SneakyThrows;
|
11 | 10 | import org.springframework.beans.factory.InitializingBean;
|
12 |
| -import org.springframework.beans.factory.annotation.Value; |
13 | 11 | import org.springframework.boot.context.properties.ConfigurationProperties;
|
14 | 12 | import org.springframework.cloud.context.config.annotation.RefreshScope;
|
15 | 13 | import org.springframework.cloud.gateway.filter.GatewayFilterChain;
|
|
21 | 19 | import org.springframework.http.server.reactive.ServerHttpResponse;
|
22 | 20 | import org.springframework.stereotype.Component;
|
23 | 21 | import org.springframework.web.server.ServerWebExchange;
|
24 |
| -import org.yaml.snakeyaml.Yaml; |
25 | 22 | import reactor.core.publisher.Mono;
|
26 | 23 |
|
27 | 24 | import javax.annotation.Resource;
|
28 | 25 | import java.net.URL;
|
29 |
| -import java.util.HashMap; |
30 | 26 | import java.util.HashSet;
|
31 |
| -import java.util.Map; |
32 |
| -import java.util.Properties; |
33 | 27 |
|
34 | 28 | import static com.tml.constant.GatewayConstantPool.AUTHORIZE_TOKEN;
|
35 | 29 |
|
@@ -75,6 +69,7 @@ public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
|
75 | 69 | if(vars.length==2){
|
76 | 70 | String uid = vars[0];
|
77 | 71 | String username = vars[1];
|
| 72 | + commonLogger.info("uid:%s,username:%s",uid,username); |
78 | 73 | newRequest = request.mutate().header("uid",uid).header("username",username).build();
|
79 | 74 | return chain.filter(exchange.mutate().request(newRequest).build());
|
80 | 75 | }
|
|
0 commit comments