春季启动:application.yml中的未知属性zuul

时间:2019-03-29 15:34:22

标签: spring-boot netflix-zuul

我在application.yml中获得了未知属性zuul,并且由于出现404错误,我的路由逻辑也无法正常工作。

不确定我是否在这里遗漏了任何东西,我是zuul代理和eureka服务的新手,请告诉我是否有任何明显的错误。

application.yml

spring:
  application:
    name: stock-service 

server:
  port: 8301 

eureka:
  client:
    registerWithEureka: true
    fetchRegistry: true
    serviceUrl:
      defaultZone: http://localhost:8302/eureka/
  instance:
    hostname: localhost

zuul:
  prefix: /api
  routes:
    db-service:
      path: /db-service/**
      url: http://localhost:8300
    stock-service:
      path: /stock-service/**
      url: http://localhost:8301

0 个答案:

没有答案