feat(负载均衡): 引入负载均衡
This commit is contained in:
parent
3d6b6cb95f
commit
6f5327117c
7
pom.xml
7
pom.xml
|
@ -39,6 +39,13 @@
|
|||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>2023.0.3</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
spring:
|
||||
cloud:
|
||||
nacos:
|
||||
server-addr: 192.168.3.132
|
||||
config:
|
||||
import-check:
|
||||
enabled: false
|
|
@ -4,7 +4,6 @@ server:
|
|||
spring:
|
||||
application:
|
||||
name: cloud-demo1
|
||||
|
||||
cloud:
|
||||
nacos:
|
||||
server-addr: 192.168.3.132
|
||||
profiles:
|
||||
include:
|
||||
- cloud
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
spring:
|
||||
cloud:
|
||||
nacos:
|
||||
server-addr: 192.168.3.132
|
||||
config:
|
||||
import-check:
|
||||
enabled: false
|
|
@ -3,7 +3,12 @@ server:
|
|||
spring:
|
||||
application:
|
||||
name: cloud-demo2
|
||||
|
||||
profiles:
|
||||
include:
|
||||
- cloud
|
||||
cloud:
|
||||
nacos:
|
||||
server-addr: 192.168.3.132
|
||||
config:
|
||||
import-check:
|
||||
enabled: false
|
||||
|
|
|
@ -61,9 +61,15 @@
|
|||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!-- nacos-config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<!-- loadbalancer -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue