我在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