Skip to content

Commit

Permalink
fix apache#286 Add Nacos registry (apache#288)
Browse files Browse the repository at this point in the history
* Add Nacos Registry
  • Loading branch information
鸟帅 authored and slievrly committed Jan 28, 2019
1 parent 35d2c5a commit 35b2ad0
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 61 deletions.
130 changes: 69 additions & 61 deletions examples/pom.xml
Original file line number Diff line number Diff line change
@@ -1,62 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 1999-2018 Alibaba Group Holding Ltd.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>fescar-all</artifactId>
<groupId>com.alibaba.fescar</groupId>
<version>0.1.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>fescar-examples</artifactId>
<packaging>jar</packaging>
<name>fescar-examples ${project.version}</name>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fescar-tm</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fescar-test</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fescar-spring</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fescar-dubbo</artifactId>
</dependency>
<dependency>
<groupId>com.101tec</groupId>
<artifactId>zkclient</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>


<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 1999-2018 Alibaba Group Holding Ltd.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>fescar-all</artifactId>
<groupId>com.alibaba.fescar</groupId>
<version>0.1.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>fescar-examples</artifactId>
<packaging>jar</packaging>
<name>fescar-examples ${project.version}</name>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fescar-tm</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fescar-test</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fescar-spring</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fescar-dubbo</artifactId>
</dependency>
<dependency>
<groupId>com.101tec</groupId>
<artifactId>zkclient</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo-registry-nacos</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.spring</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>


</project>
2 changes: 2 additions & 0 deletions examples/src/main/resources/dubbo-account-service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
<dubbo:registry address="multicast://224.5.6.7:1234?unicast=false" />
<!--support zk-->
<!--dubbo:registry address="zookeeper://test.zk1.cc:1234?backup=test.zk2.cc:1234,test.zk3.cc:1234" /-->
<!--support nacos-->
<!-- <dubbo:registry address="nacos://127.0.0.1:8848"/> -->
<dubbo:protocol name="dubbo" port="20881" />
<dubbo:service interface="com.alibaba.fescar.tm.dubbo.AccountService" ref="service" timeout="10000"/>

Expand Down
2 changes: 2 additions & 0 deletions examples/src/main/resources/dubbo-order-service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
<dubbo:registry address="multicast://224.5.6.7:1234?unicast=false"/>
<!--support zk-->
<!--dubbo:registry address="zookeeper://test.zk1.cc:1234?backup=test.zk2.cc:1234,test.zk3.cc:1234" /-->
<!--support nacos-->
<!-- <dubbo:registry address="nacos://127.0.0.1:8848"/> -->
<dubbo:protocol name="dubbo" port="20883"/>
<dubbo:service interface="com.alibaba.fescar.tm.dubbo.OrderService" ref="service" timeout="10000"/>

Expand Down
2 changes: 2 additions & 0 deletions examples/src/main/resources/dubbo-storage-service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
<dubbo:registry address="multicast://224.5.6.7:1234?unicast=false" />
<!--support zk-->
<!--dubbo:registry address="zookeeper://test.zk1.cc:1234?backup=test.zk2.cc:1234,test.zk3.cc:1234" /-->
<!--support nacos-->
<!--<dubbo:registry address="nacos://127.0.0.1:8848"/>-->
<dubbo:protocol name="dubbo" port="20882" />
<dubbo:service interface="com.alibaba.fescar.tm.dubbo.StorageService" ref="service" timeout="10000"/>

Expand Down
11 changes: 11 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<junit.version>4.12</junit.version>
<dubbo.version>2.5.3</dubbo.version>
<zkclient.version>0.10</zkclient.version>
<dubbo.registry.nacos>0.0.1</dubbo.registry.nacos>
</properties>
<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -222,6 +223,16 @@
<artifactId>zkclient</artifactId>
<version>${zkclient.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo-registry-nacos</artifactId>
<version>${dubbo.registry.nacos}</version>
</dependency>
<dependency>
<groupId>com.alibaba.spring</groupId>
<artifactId>spring-context-support</artifactId>
<version>1.0.2</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down

0 comments on commit 35b2ad0

Please sign in to comment.