当前位置:   article > 正文

Spring Cloud Gateway 启动报错RoutePredicateFactory with name path_unable to find routepredicatefactory with name pat

unable to find routepredicatefactory with name path

在启动Spring Cloud Gateway是报错:

org.springframework.context.ApplicationContextException: Failed to start bean 'eurekaAutoServiceRegistration'; nested exception is reactor.core.Exceptions$ErrorCallbackNotImplemented: java.lang.IllegalArgumentException: Unable to find RoutePredicateFactory with name path

 

原因是我的配置文件application.yml中配置routes时, Path字母P小写导致的,应该是大写

  1. routes:
  2. - id: payment_fast #路由id,要求唯一
  3. uri: http://localhost:8001 # 匹配后提供服务的路由地址
  4. predicates:
  5. - Path=/payment/get/** # 断言,路径匹配的进行路由
  6. - id: payment_slow #路由id,要求唯一
  7. uri: http://localhost:8001 # 匹配后提供服务的路由地址
  8. predicates:
  9. - Path=/payment/out/** # 断言,路径匹配的进行路由

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/301265
推荐阅读
相关标签
  

闽ICP备14008679号