mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
Polish : /spring-cloud-incubator/spring-cloud-alibaba#386 : Supports all Spring Cloud Registries and default is Nacos
This commit is contained in:
parent
ab1ecca6ab
commit
f719e16d38
@ -103,6 +103,9 @@
|
|||||||
<!-- Nacos -->
|
<!-- Nacos -->
|
||||||
<profile>
|
<profile>
|
||||||
<id>nacos</id>
|
<id>nacos</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- Nacos Service Discovery -->
|
<!-- Nacos Service Discovery -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -119,7 +122,6 @@
|
|||||||
<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>
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</profile>
|
</profile>
|
||||||
@ -133,7 +135,6 @@
|
|||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-zookeeper-discovery</artifactId>
|
<artifactId>spring-cloud-starter-zookeeper-discovery</artifactId>
|
||||||
<version>${spring-cloud-zookeeper.version}</version>
|
<version>${spring-cloud-zookeeper.version}</version>
|
||||||
<optional>true</optional>
|
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.apache.zookeeper</groupId>
|
<groupId>org.apache.zookeeper</groupId>
|
||||||
@ -159,23 +160,18 @@
|
|||||||
<groupId>org.apache.curator</groupId>
|
<groupId>org.apache.curator</groupId>
|
||||||
<artifactId>curator-framework</artifactId>
|
<artifactId>curator-framework</artifactId>
|
||||||
<version>${curator.version}</version>
|
<version>${curator.version}</version>
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>consul</id>
|
<id>consul</id>
|
||||||
<activation>
|
|
||||||
<activeByDefault>true</activeByDefault>
|
|
||||||
</activation>
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- Spring Cloud Consul -->
|
<!-- Spring Cloud Consul -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-consul-discovery</artifactId>
|
<artifactId>spring-cloud-starter-consul-discovery</artifactId>
|
||||||
<version>${spring-cloud-consul.version}</version>
|
<version>${spring-cloud-consul.version}</version>
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</profile>
|
</profile>
|
||||||
|
@ -209,7 +209,7 @@ public class DubboSpringCloudConsumerBootstrap {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
new SpringApplicationBuilder(DubboSpringCloudConsumerBootstrap.class)
|
new SpringApplicationBuilder(DubboSpringCloudConsumerBootstrap.class)
|
||||||
.profiles("consul")
|
.profiles("nacos")
|
||||||
.run(args);
|
.run(args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ spring:
|
|||||||
main:
|
main:
|
||||||
allow-bean-definition-overriding: true
|
allow-bean-definition-overriding: true
|
||||||
|
|
||||||
|
|
||||||
# default disable all
|
# default disable all
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
@ -19,11 +20,14 @@ eureka:
|
|||||||
client:
|
client:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
ribbon:
|
||||||
|
nacos:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
provider:
|
provider:
|
||||||
application:
|
application:
|
||||||
name: spring-cloud-alibaba-dubbo-provider
|
name: spring-cloud-alibaba-dubbo-provider
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
spring:
|
spring:
|
||||||
profiles: nacos
|
profiles: nacos
|
||||||
@ -35,6 +39,9 @@ spring:
|
|||||||
register-enabled: true
|
register-enabled: true
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 127.0.0.1:8848
|
||||||
|
|
||||||
|
ribbon:
|
||||||
|
nacos:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
---
|
---
|
||||||
spring:
|
spring:
|
||||||
|
@ -29,7 +29,7 @@ public class DubboSpringCloudProviderBootstrap {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
new SpringApplicationBuilder(DubboSpringCloudProviderBootstrap.class)
|
new SpringApplicationBuilder(DubboSpringCloudProviderBootstrap.class)
|
||||||
.profiles("consul")
|
.profiles("nacos")
|
||||||
.run(args);
|
.run(args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user