![](/img/trans.png)
[英]Spring Cloud Gateway 2.0.0.RELEASE:Unable to find GatewayFilterFactory with name Hystrix
[英]Spring Cloud Gateway Failed to start: Unable to find GatewayFilterFactory with name <blank>
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
在用於創建過濾器的 spring 雲網關代碼中,它說:
GatewayFilterFactory factory = this.gatewayFilterFactories.get(definition.getName());
if (factory == null) {
throw new IllegalArgumentException("Unable to find GatewayFilterFactory with name " + definition.getName());
}
因此,如果無法創建網關過濾器工廠,則異常應給出一條消息:
“無法找到名稱為<some name>
GatewayFilterFactory ”,但我的日志中沒有這樣的東西,只是“無法找到名稱為“的 GatewayFilterFactory”。 經過2天的研究,我終於發現,我的配置文件中有一個錯誤:
- id: api_assets
uri: lb://BACKEND
predicates:
- Path=/api/assets/**
filters:
- name: AuditFilter
-
帶有空白的過濾器名稱列表
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.