在使用 spring 微服務(wù)時(shí),我無法通過 zuul 代理路由 api這是我的代碼尤爾卡:應(yīng)用程序.ymlspring: application: name: api cloud: config: enabled: trueserver: port: ${PORT:8761}eureka: client: registerWithEureka: false fetchRegistry: false serviceUrl: defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/ instance: hostname: localhost祖爾:應(yīng)用程序.ymlspring: application: name: proxy-serverserver: port: 8079eureka: client: serviceUrl: defaultZone: http://localhost:8761/eureka fetchRegistry: truezuul: ignored-services: '*' prefix: /api routes: account: path: /account/** serviceId: account stripPrefix: false host: socket-timeout-millis: 30000ribbion: eureka: enabled: true賬戶申請(qǐng).ymlribbion: eureka: enabled: trueeureka: instance: preferIpAddress: true client: serviceUrl: defaultZone: ${EUREKA_URI:http://localhost:8761/eureka} instance: preferIpAddress: true依賴:<dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>Finchley.SR1</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies></dependencyManagement>現(xiàn)在 urllocalhost:8080/user/工作正常,但localhost:8080/api/account/user/拋出 404。不確定我在這里做錯(cuò)了什么,任何見解都會(huì)有所幫助,如果您需要其他詳細(xì)信息,請(qǐng)告訴我
Zuul 代理不路由
慕無忌1623718
2021-07-20 17:16:55