简体   繁体   English

Spring Cloud Gateway 启动失败:无法找到具有名称的 GatewayFilterFactory<blank>

[英]Spring Cloud Gateway Failed to start: Unable to find GatewayFilterFactory with name <blank>

Spring Cloud Gateway failed to start, and gives the following exception: Spring Cloud Gateway 启动失败,出现如下异常:

service-gateway      | 2020-01-02 13:44:55.910  INFO 22 --- [           main] c.n.discovery.InstanceInfoReplicator     : InstanceInfoReplicator onDemand update allowed rate per min is 4
service-gateway      | 2020-01-02 13:44:55.915  INFO 22 --- [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1577943895914 with initial instances count: 11
service-gateway      | 2020-01-02 13:44:55.916  INFO 22 --- [           main] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application SERVICE-GATEWAY with eureka with status UP
service-gateway      | 2020-01-02 13:44:55.917  INFO 22 --- [           main] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1577943895917, current=UP, previous=STARTING]
service-gateway      | 2020-01-02 13:44:55.923  INFO 22 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_SERVICE-GATEWAY/a5881e80ffd5:service-gateway:1790: registering service...
service-gateway      | 2020-01-02 13:44:55.991  INFO 22 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_SERVICE-GATEWAY/a5881e80ffd5:service-gateway:1790 - registration status: 204
service-gateway      | 2020-01-02 13:44:56.051  WARN 22 --- [           main] onfigReactiveWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'eurekaAutoServiceRegistration'; nested exception is reactor.core.Exceptions$ErrorCallbackNotImplemented: java.lang.IllegalArgumentException: Unable to find GatewayFilterFactory with name 
service-gateway      | 2020-01-02 13:44:56.083  INFO 22 --- [           main] com.netflix.discovery.DiscoveryClient    : Shutting down DiscoveryClient ...
service-gateway      | 2020-01-02 13:44:59.085  INFO 22 --- [           main] com.netflix.discovery.DiscoveryClient    : Unregistering ...
service-gateway      | 2020-01-02 13:44:59.093  INFO 22 --- [           main] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_SERVICE-GATEWAY/a5881e80ffd5:service-gateway:1790 - deregister  status: 200
service-gateway      | 2020-01-02 13:44:59.104  INFO 22 --- [           main] com.netflix.discovery.DiscoveryClient    : Completed shut down of DiscoveryClient

In spring cloud gateway code that used to create filter it says:在用于创建过滤器的 spring 云网关代码中,它说:

GatewayFilterFactory factory = this.gatewayFilterFactories.get(definition.getName());
                    if (factory == null) {
                        throw new IllegalArgumentException("Unable to find GatewayFilterFactory with name " + definition.getName());
                    }

so if it failed to to create the gatewayFilterFactory, the exception should gives a message:因此,如果无法创建网关过滤器工厂,则异常应给出一条消息:

"Unable to find GatewayFilterFactory with name <some name> ", But there is no such thing in my log, just "Unable to find GatewayFilterFactory with name ". “无法找到名称为<some name> GatewayFilterFactory ”,但我的日志中没有这样的东西,只是“无法找到名称为“的 GatewayFilterFactory”。 After 2 days of research and I finally found, there is an error in my config file:经过2天的研究,我终于发现,我的配置文件中有一个错误:

        - id:  api_assets
          uri: lb://BACKEND
          predicates:
            - Path=/api/assets/**
          filters:
            - name: AuditFilter
            -

A LIST OF FILTER NAMES WITH A BLANK ONE带有空白的过滤器名称列表

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Spring Cloud Gateway 2.0.0.RELEASE:无法找到名称为 Hystrix 的 GatewayFilterFactory - Spring Cloud Gateway 2.0.0.RELEASE:Unable to find GatewayFilterFactory with name Hystrix Spring 网关和 Auth0:IllegalArgumentException:找不到名称为 TokenRelay 的 GatewayFilterFactory - Spring Gateway and Auth0: IllegalArgumentException: Unable to find GatewayFilterFactory with name TokenRelay java.lang.IllegalArgumentException:找不到名称为 RequestRateLimiter 的 GatewayFilterFactory - java.lang.IllegalArgumentException: Unable to find GatewayFilterFactory with name RequestRateLimiter Spring Cloud Contract 无法启动 Stub Runner - Spring Cloud Contract failed to start Stub Runner 无法在服务中启动spring cloud eureka客户端 - Unable to start the spring cloud eureka client in a service 无法使用 API 网关 Spring 云调用实际服务 - Unable to make a call to actual service using API Gateway Spring Cloud Docker Compose中的Spring Cloud Gateway返回ERR_NAME_NOT_RESOLVED - Spring Cloud Gateway in Docker Compose returns ERR_NAME_NOT_RESOLVED Spring 带 SAML 的云网关 - Spring Cloud Gateway with SAML Spring 云网关带断路器 - Spring Cloud Gateway with CircuitBreaker Spring Cloud Gateway 中的身份验证 - Authentication in spring cloud gateway
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM