创建过滤器代码:验证令牌过滤不完整版本
/**
* 令牌验证过滤器
* @author wuxie
* @date 2019-1-14
*/
public class TokenValidateGatewayFilterFactory extends AbstractGatewayFilterFactory<TokenValidateGatewayFilterFactory.Config> {
private static Logger logger= LoggerFactory.getLogger(TokenValidateGatewayFilterFactory.class);
private final JsonMapper jsonMapper;
public TokenValidateGatewayFilterFactory(JsonMapper jsonMapper) {
super(Config.class);
this.jsonMapper = jsonMapper;
}
@Override
public GatewayFilter apply(Config config) {