mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-12 07:02:14 +08:00
nacos
This commit is contained in:
@@ -38,7 +38,7 @@ registry:
|
|||||||
# nacos服务器地址
|
# nacos服务器地址
|
||||||
nacos-server-addr: 127.0.0.1:8848
|
nacos-server-addr: 127.0.0.1:8848
|
||||||
# 使用eureka,填:eureka,使用nacos填:nacos
|
# 使用eureka,填:eureka,使用nacos填:nacos
|
||||||
name: eureka
|
name: nacos
|
||||||
|
|
||||||
|
|
||||||
# 根据实际情况改
|
# 根据实际情况改
|
||||||
|
@@ -39,23 +39,23 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- 注册中心【只能用一个,不用的注释掉】 -->
|
<!-- 注册中心【只能用一个,不用的注释掉】 -->
|
||||||
<!-- 使用eureka注册中心 -->
|
<!-- 使用eureka注册中心
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
|
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- 使用nacos注册中心
|
<!-- 使用nacos注册中心
|
||||||
版本 0.2.x.RELEASE 对应的是 Spring Boot 2.x 版本,版本 0.1.x.RELEASE 对应的是 Spring Boot 1.x 版本。
|
版本 0.2.x.RELEASE 对应的是 Spring Boot 2.x 版本,版本 0.1.x.RELEASE 对应的是 Spring Boot 1.x 版本。
|
||||||
https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-alibaba-nacos-discovery
|
https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-alibaba-nacos-discovery
|
||||||
|
-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
<version>0.2.2.RELEASE</version>
|
<version>0.2.2.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
-->
|
|
||||||
<!-- 注册中心end -->
|
<!-- 注册中心end -->
|
||||||
|
|
||||||
|
|
||||||
|
@@ -11,15 +11,15 @@ spring:
|
|||||||
connect-string: localhost:2181
|
connect-string: localhost:2181
|
||||||
|
|
||||||
# nacos注册中心,和eureka只能用一个
|
# nacos注册中心,和eureka只能用一个
|
||||||
# nacos:
|
nacos:
|
||||||
# discovery:
|
discovery:
|
||||||
# server-addr: 127.0.0.1:8848
|
server-addr: 127.0.0.1:8848
|
||||||
|
|
||||||
# eureka注册中心,如果使用nacos注册中心,这里要注释掉
|
# eureka注册中心,如果使用nacos注册中心,这里要注释掉
|
||||||
eureka:
|
#eureka:
|
||||||
client:
|
# client:
|
||||||
serviceUrl:
|
# serviceUrl:
|
||||||
defaultZone: http://localhost:1111/eureka/
|
# defaultZone: http://localhost:1111/eureka/
|
||||||
|
|
||||||
# dubbo consumer
|
# dubbo consumer
|
||||||
demo:
|
demo:
|
||||||
|
@@ -33,23 +33,23 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 注册中心【只能用一个,不用的注释掉】 -->
|
<!-- 注册中心【只能用一个,不用的注释掉】 -->
|
||||||
<!-- 使用eureka注册中心 -->
|
<!-- 使用eureka注册中心
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
|
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- 使用nacos注册中心
|
<!-- 使用nacos注册中心
|
||||||
版本 0.2.x.RELEASE 对应的是 Spring Boot 2.x 版本,版本 0.1.x.RELEASE 对应的是 Spring Boot 1.x 版本。
|
版本 0.2.x.RELEASE 对应的是 Spring Boot 2.x 版本,版本 0.1.x.RELEASE 对应的是 Spring Boot 1.x 版本。
|
||||||
https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-alibaba-nacos-discovery
|
https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-alibaba-nacos-discovery
|
||||||
|
-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
<version>0.2.2.RELEASE</version>
|
<version>0.2.2.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
-->
|
|
||||||
<!-- 注册中心end -->
|
<!-- 注册中心end -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@@ -11,15 +11,15 @@ spring:
|
|||||||
connect-string: localhost:2181
|
connect-string: localhost:2181
|
||||||
|
|
||||||
# nacos注册中心,和eureka只能用一个
|
# nacos注册中心,和eureka只能用一个
|
||||||
# nacos:
|
nacos:
|
||||||
# discovery:
|
discovery:
|
||||||
# server-addr: 127.0.0.1:8848
|
server-addr: 127.0.0.1:8848
|
||||||
|
|
||||||
# eureka注册中心,如果使用nacos注册中心,这里要注释掉
|
# eureka注册中心,如果使用nacos注册中心,这里要注释掉
|
||||||
eureka:
|
#eureka:
|
||||||
client:
|
# client:
|
||||||
serviceUrl:
|
# serviceUrl:
|
||||||
defaultZone: http://localhost:1111/eureka/
|
# defaultZone: http://localhost:1111/eureka/
|
||||||
|
|
||||||
# dubbo provider
|
# dubbo provider
|
||||||
dubbo:
|
dubbo:
|
||||||
|
@@ -66,23 +66,24 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 注册中心【只能用一个,不用的注释掉】 -->
|
<!-- 注册中心【只能用一个,不用的注释掉】 -->
|
||||||
<!-- 使用eureka注册中心 -->
|
<!-- 使用eureka注册中心
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
|
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
<!-- 使用nacos注册中心
|
<!-- 使用nacos注册中心
|
||||||
版本 0.2.x.RELEASE 对应的是 Spring Boot 2.x 版本,版本 0.1.x.RELEASE 对应的是 Spring Boot 1.x 版本。
|
版本 0.2.x.RELEASE 对应的是 Spring Boot 2.x 版本,版本 0.1.x.RELEASE 对应的是 Spring Boot 1.x 版本。
|
||||||
https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-alibaba-nacos-discovery
|
https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-alibaba-nacos-discovery
|
||||||
|
-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
<version>0.2.2.RELEASE</version>
|
<version>0.2.2.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
-->
|
|
||||||
<!-- 注册中心end -->
|
<!-- 注册中心end -->
|
||||||
|
|
||||||
<!-- test -->
|
<!-- test -->
|
||||||
|
@@ -7,7 +7,7 @@ registry:
|
|||||||
# nacos服务器地址
|
# nacos服务器地址
|
||||||
nacos-server-addr: 127.0.0.1:8848
|
nacos-server-addr: 127.0.0.1:8848
|
||||||
# 使用eureka,填:eureka,使用nacos填:nacos
|
# 使用eureka,填:eureka,使用nacos填:nacos
|
||||||
name: eureka
|
name: nacos
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
|
Reference in New Issue
Block a user