依赖
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
<version>2.2.9.RELEASE</version>
</dependency>
启动类添加注解
@EnableZuulProxy
配置文件
URI转发
zuul.routes.xx.path=/xx/**
zuul.routes.xx.url=http://127.0.0.1:8181
不带前缀请求
zuul.prefix=/api/v1
zuul.strip-prefix=false