SpringCloud项目搭建(四) zuul
前面的步骤一样。
注解:@EnableZuulProxy @EnableEurekaClient
yml:
server: port: 8898 spring: application: name: zuul-client eureka: client: service-url: defaultZone: http://user:123456@localhost:8890/eureka/ zuul: routes: ribbon: path: /ribbon/** serviceId: ribbon-client client: path: /client/** serviceId: eureka-client baidu: path: /baidu/** url: http://baidu.com
测试:
http://192.168.1.144:8898/baidu
***加前缀
@
-------博客内容仅用于个人学习总结-------