在使用 spring 微服务时,我无法通过 zuul 代理路由 api这是我的代码尤尔卡:应用程序.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祖尔:应用程序.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账户申请.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>现在 urllocalhost:8080/user/工作正常,但localhost:8080/api/account/user/抛出 404。不确定我在这里做错了什么,任何见解都会有所帮助,如果您需要其他详细信息,请告诉我
添加回答
举报
0/150
提交
取消