springcloud(十四):搭建Zuul微服务网关

 1.创建项目如下

springcloud(十五):搭建Zuul微服务网关

 

 2.创建项目勾选web,zuul,eurekaclient

3.pom.xml文件内容许下

 1     <dependencies>
 2         <dependency>
 3             <groupId>org.springframework.boot</groupId>
 4             <artifactId>spring-boot-starter-web</artifactId>
 5         </dependency>
 6         <dependency>
 7             <groupId>org.springframework.cloud</groupId>
 8             <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
 9         </dependency>
10         <dependency>
11             <groupId>org.springframework.cloud</groupId>
12             <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
13         </dependency>
14 
15         <dependency>
16             <groupId>org.springframework.boot</groupId>
17             <artifactId>spring-boot-starter-test</artifactId>
18             <scope>test</scope>
19         </dependency>
20     </dependencies>
pom.xml

相关文章: