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