spring cloud gateway 报错 Unable to find GatewayFilterFactory with name


Unable to find GatewayFilterFactory with name xxx
原因是过滤器名称导致的...
spring 约定过滤器类名"xxx"+GatewayFilterFactory,其中"xxx"为配置中的name;

  • 配置文件中
filters:
            - name: ValidateCodeFilter

改成

filters:
            - name: ValidateCode
  • 过滤器类名
public class ValidateCodeFilter extends AbstractGatewayFilterFactory { } 

改成

public class ValidateCodeGatewayFilterFactory extends AbstractGatewayFilterFactory { } 
 

链接:https://www.jianshu.com/p/61ad2d3317b1
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM