在application.yml中找不到zuul属性

时间:2019-03-25 18:35:43

标签: spring spring-boot spring-cloud spring-cloud-netflix

在pom.xml附带的application.yml中找不到以下zuul属性。 我希望我添加了必要的依赖项,或者我没有遗漏任何东西。 如何将服务与网关连接。

application.yml

zuul.routes.hello.path=/hello/**
zuul.routes.hello.serviceId=Beginner-Microservice

enter image description here

<dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-sleuth</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-sleuth-zipkin</artifactId>
        </dependency>

参考链接

https://javabeginnerstutorial.com/spring-boot/spring-boot-2-microservices-with-netflix-zuul-api-gateway/

我使用的Spring cloud版本是

<spring-cloud.version>Finchley.M8</spring-cloud.version>

在这方面请帮助我

0 个答案:

没有答案