1. gateway 引入 nacos 依赖,实现服务的注册发现

2. gateway 引入 loadbalancer 依赖,实现服务的负载均衡
This commit is contained in:
YunaiV
2022-06-02 23:43:34 +08:00
parent 9bb0422c1c
commit 94d62b8d79
5 changed files with 33 additions and 7 deletions

View File

@@ -16,11 +16,24 @@
<url>https://github.com/YunaiV/yudao-cloud</url>
<dependencies>
<!-- 引入 Spring Cloud Gateway 相关依赖,使用它作为网关,并实现对其的自动配置 -->
<!-- Gateway 网关相关 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>
<!-- RPC 远程调用相关 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>
<!-- Registry 注册中心相关 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
</dependencies>
</project>