mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
Compare commits
190 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c5e27237fb | |||
| 58c64f03af | |||
| b1af3e2b87 | |||
| 86640fc353 | |||
| 96c3b36a83 | |||
| 49d0ebdabe | |||
| b72d468be1 | |||
| 74ef969a33 | |||
| 4106d48810 | |||
| d1e4711e98 | |||
| f6e8482e2c | |||
| 5b8d25ef9c | |||
| 6b3b017209 | |||
| cd96dd968b | |||
| 9b29353b15 | |||
| 4402ee0bbe | |||
| 84202dab53 | |||
| 57e3059d8d | |||
| 97528396fd | |||
| 85435b9acb | |||
| d6042370d4 | |||
| dbba024538 | |||
| 8e63a01e2f | |||
| 7b505b6cb2 | |||
| acf7001d9f | |||
| 26741dc799 | |||
| ab06f3232c | |||
| 648944df09 | |||
| 5f8d8cc043 | |||
| 8a29377782 | |||
| c94c84d110 | |||
| 0973be9750 | |||
| 7bc57cbfdf | |||
| 322c7db4a5 | |||
| 9a5518d302 | |||
| 23c3dd69ab | |||
| f789803cac | |||
| 00d449ba23 | |||
| d040d6a3b7 | |||
| ddceb5f312 | |||
| b0273fb1c8 | |||
| b70129c17f | |||
| a9e519265a | |||
| f7455bcf88 | |||
| 0b50a47a02 | |||
| 9b45147d4e | |||
| 2a18ddb0be | |||
| c348421970 | |||
| d28a36d149 | |||
| c7f1d02e21 | |||
| d675d7d47f | |||
| fed46416be | |||
| 52ce4b53a7 | |||
| f36c94d3ed | |||
| fbd72a6000 | |||
| 4ac2622753 | |||
| c644a2c1ec | |||
| c216cad31c | |||
| 7b79b6a11b | |||
| 34d8267068 | |||
| 1368a1aa84 | |||
| aba89ed5ba | |||
| c3d76b391f | |||
| a27d0e2c71 | |||
| 85ddda03ff | |||
| 54d97a37b4 | |||
| 0def289574 | |||
| 1d99e35977 | |||
| 1afc7cbbc1 | |||
| 792d008863 | |||
| 829dc23550 | |||
| 3f8e6d69bf | |||
| b1c0c1aa12 | |||
| 53570e64bd | |||
| 7d60c28a3a | |||
| 80300b9a90 | |||
| 0519e551ff | |||
| b86503c0ad | |||
| f04a4b1fb0 | |||
| 2574c2217b | |||
| f34641871a | |||
| d79207c64b | |||
| c765fc088d | |||
| 224ef57307 | |||
| 1e26df1aa1 | |||
| ffb246829f | |||
| bd77f3f919 | |||
| 71f8dc0037 | |||
| cc053a520a | |||
| ddc5f57caf | |||
| cef87972d7 | |||
| 3c88e92262 | |||
| 4c3a28ebd5 | |||
| cfa1b20799 | |||
| e4a4e7f288 | |||
| 859753976b | |||
| 460daaf1d8 | |||
| ed598ba427 | |||
| 34308b0a49 | |||
| 935f50f9ab | |||
| 492b8d3b20 | |||
| 414f8dbf3d | |||
| 62ad5de3e2 | |||
| ad143f16e6 | |||
| b2825b275f | |||
| b64337f00c | |||
| e01a781e10 | |||
| 9d5d1e81ad | |||
| d95794fa50 | |||
| bfdf610173 | |||
| 24984db970 | |||
| 45479ec2fe | |||
| 8880515147 | |||
| 5713effaa1 | |||
| 36c367cbe3 | |||
| 217296ba02 | |||
| 7ee641259c | |||
| de9b1be4be | |||
| 16e9494487 | |||
| c52cbfb92d | |||
| 81e1bcfb09 | |||
| b24d9a2293 | |||
| 327c228129 | |||
| 9b32b41d05 | |||
| f904bb4acb | |||
| 1bc20774c5 | |||
| 3a8337dd27 | |||
| 6a90e643e6 | |||
| 0762b9fbe5 | |||
| 00f5e1afea | |||
| 7238d83127 | |||
| 6150ca99a1 | |||
| 447a98ac8f | |||
| b3661d6630 | |||
| fe74824d3d | |||
| 576de3a218 | |||
| 3c8596248e | |||
| 3b6220dd48 | |||
| 4d5b0fd191 | |||
| 1773b49872 | |||
| 33148731ff | |||
| 9441194da4 | |||
| 3298ea1adf | |||
| 2435167e1e | |||
| ed6942d9df | |||
| df3d9ce0e8 | |||
| ec82376f0a | |||
| 670967a41c | |||
| 7c452f6f7f | |||
| 179eab2b7e | |||
| d195ebd299 | |||
| b83b1b78dc | |||
| f0f86868b2 | |||
| 5162d02b4e | |||
| 353e8ba17e | |||
| 9ab9141895 | |||
| dab11a2c79 | |||
| e774cbe74d | |||
| d610f0e421 | |||
| 101ac4c605 | |||
| ec22e812fe | |||
| 0e82361ff4 | |||
| 27ebbca4e3 | |||
| 2d1bdbf3d2 | |||
| 379a8dc04a | |||
| 5585da415a | |||
| 7a63f9fb4e | |||
| 6e885c8ebf | |||
| 36f693f3f1 | |||
| 75f02aa2c5 | |||
| 08cce947fd | |||
| bd0953cd7a | |||
| fdf8bda86b | |||
| 572b13a0b3 | |||
| 0de7efabd4 | |||
| 181116a738 | |||
| 7dd7fa9c49 | |||
| b8d9b4f787 | |||
| ec70d989e9 | |||
| aff20a84a7 | |||
| 23fa1f43f2 | |||
| 0890e02db9 | |||
| e8ee68998e | |||
| d2684c2882 | |||
| 4552ceb750 | |||
| e4598fb6e8 | |||
| 5b9c037f16 | |||
| 7a355cb840 | |||
| 9edab1215b | |||
| e3bd0c8c06 |
+3
-1
@@ -124,7 +124,9 @@ spring-cloud-alibaba@googlegroups.com,欢迎通过此邮件列表讨论与 spr
|
||||
|
||||
### 钉钉群
|
||||
|
||||

|
||||

|
||||
|
||||
如图片有问题,访问 https://img.alicdn.com/tfs/TB1zrRie4v1gK0jSZFFXXb0sXXa-7862-3570.png
|
||||
|
||||
## 社区相关开源
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ Examples:
|
||||
|
||||
[Alibaba Cloud OSS Example](https://github.com/alibaba/spring-cloud-alibaba/blob/master/spring-cloud-alibaba-examples/oss-example/readme.md)
|
||||
|
||||
[Duboo Spring Cloud Example](https://github.com/alibaba/spring-cloud-alibaba/blob/master/spring-cloud-alibaba-examples/spring-cloud-alibaba-dubbo-examples/README_CN.md)
|
||||
[Dubbo Spring Cloud Example](https://github.com/alibaba/spring-cloud-alibaba/blob/master/spring-cloud-alibaba-examples/spring-cloud-alibaba-dubbo-examples/README_CN.md)
|
||||
|
||||
## Version control guidelines
|
||||
The version number of the project is in the form of x.x.x, where x is a number, starting from 0, and is not limited to the range 0~9. When the project is in the incubator phase, the version number is 0.x.x.
|
||||
|
||||
@@ -227,7 +227,7 @@ export MAVEN_CMD_LINE_ARGS
|
||||
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
echo "Running version check"
|
||||
VERSION=$( sed '\!<parent!,\!</parent!d' `dirname $0`/pom.xml | grep '<revision' | head -1 | sed -e 's/.*<revision>//' -e 's!</revision>.*$!!' )
|
||||
VERSION=$( sed '\!<parent!,\!</parent!d' `dirname $0`/pom.xml | grep '<version' | head -1 | sed -e 's/.*<version>//' -e 's!</version>.*$!!' )
|
||||
echo "The found version is [${VERSION}]"
|
||||
|
||||
if echo $VERSION | egrep -q 'M|RC'; then
|
||||
|
||||
@@ -8,17 +8,17 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-build</artifactId>
|
||||
<version>2.1.11.RELEASE</version>
|
||||
<version>2.2.0.RELEASE</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba</artifactId>
|
||||
<version>${revision}</version>
|
||||
<version>2.2.0.RELEASE</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Spring Cloud Alibaba</name>
|
||||
<description>Spring Cloud Alibaba</description>
|
||||
<url>https://github.com/alibaba/spring-cloud-alibaba/tree/greenwich</url>
|
||||
<url>https://github.com/alibaba/spring-cloud-alibaba</url>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
@@ -69,36 +69,26 @@
|
||||
<name>yunzheng</name>
|
||||
<email>yunzheng1228@gmail.com</email>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>theonefx</id>
|
||||
<name>theonefx</name>
|
||||
<email>chenxilzx1@gmail.com</email>
|
||||
<organization>Alibaba</organization>
|
||||
<url>https://github.com/theonefx</url>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<properties>
|
||||
<!-- Project revision -->
|
||||
<revision>2.1.2.RELEASE</revision>
|
||||
|
||||
<!-- Dependency Versions -->
|
||||
<spring-cloud-commons.version>2.1.5.RELEASE</spring-cloud-commons.version>
|
||||
<spring-cloud-config.version>2.1.7.RELEASE</spring-cloud-config.version>
|
||||
<spring-cloud-consul.version>2.1.5.RELEASE</spring-cloud-consul.version>
|
||||
<spring-cloud-gateway.version>2.1.5.RELEASE</spring-cloud-gateway.version>
|
||||
<spring-cloud-netflix.version>2.1.5.RELEASE</spring-cloud-netflix.version>
|
||||
<spring-cloud-openfeign.version>2.1.5.RELEASE</spring-cloud-openfeign.version>
|
||||
<spring-cloud-bus.version>2.1.4.RELEASE</spring-cloud-bus.version>
|
||||
<spring-cloud-stream.version>Fishtown.SR4</spring-cloud-stream.version>
|
||||
<spring-cloud-zookeeper.version>2.1.4.RELEASE</spring-cloud-zookeeper.version>
|
||||
<spring-cloud-commons.version>2.2.0.RELEASE</spring-cloud-commons.version>
|
||||
<spring-cloud-netflix.version>2.2.0.RELEASE</spring-cloud-netflix.version>
|
||||
<spring-cloud-openfeign.version>2.2.0.RELEASE</spring-cloud-openfeign.version>
|
||||
<spring-cloud-bus.version>2.2.0.RELEASE</spring-cloud-bus.version>
|
||||
<spring-cloud-gateway.version>2.2.0.RELEASE</spring-cloud-gateway.version>
|
||||
<spring-cloud-stream.version>Horsham.RELEASE</spring-cloud-stream.version>
|
||||
<spring-cloud-consul.version>2.2.0.RELEASE</spring-cloud-consul.version>
|
||||
<spring-cloud-config.version>2.2.0.RELEASE</spring-cloud-config.version>
|
||||
<spring-cloud-zookeeper.version>2.2.0.RELEASE</spring-cloud-zookeeper.version>
|
||||
|
||||
<junit.version>4.12</junit.version>
|
||||
<javax-servlet-api>3.0</javax-servlet-api>
|
||||
<slf4j-api.version>1.7.25</slf4j-api.version>
|
||||
|
||||
<!-- Apache Dubbo -->
|
||||
<dubbo.version>2.7.6</dubbo.version>
|
||||
<dubbo.version>2.7.4.1</dubbo.version>
|
||||
<curator.version>4.0.1</curator.version>
|
||||
|
||||
<!-- Apache RocketMQ -->
|
||||
@@ -110,18 +100,32 @@
|
||||
<maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
|
||||
<gmavenplus-plugin.version>1.6</gmavenplus-plugin.version>
|
||||
<jacoco.version>0.8.3</jacoco.version>
|
||||
<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
|
||||
<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
|
||||
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
|
||||
<flatten-maven-plugin.version>1.1.0</flatten-maven-plugin.version>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
<module>spring-cloud-alibaba-dependencies</module>
|
||||
<module>spring-cloud-alibaba-sentinel</module>
|
||||
<module>spring-cloud-alibaba-sentinel-datasource</module>
|
||||
<module>spring-cloud-alibaba-sentinel-gateway</module>
|
||||
<module>spring-cloud-circuitbreaker-sentinel</module>
|
||||
<module>spring-cloud-alibaba-nacos-config</module>
|
||||
<module>spring-cloud-alibaba-nacos-discovery</module>
|
||||
<module>spring-cloud-alibaba-seata</module>
|
||||
<module>spring-cloud-stream-binder-rocketmq</module>
|
||||
<module>spring-cloud-alibaba-nacos-config-server</module>
|
||||
<module>spring-cloud-alibaba-dubbo</module>
|
||||
<module>spring-cloud-alicloud-context</module>
|
||||
<module>spring-cloud-alibaba-examples</module>
|
||||
<module>spring-cloud-alibaba-docs</module>
|
||||
<module>spring-cloud-alibaba-starters</module>
|
||||
<module>spring-cloud-starter-alibaba</module>
|
||||
<module>spring-cloud-starter-alicloud</module>
|
||||
<module>spring-cloud-alicloud-oss</module>
|
||||
<module>spring-cloud-alicloud-acm</module>
|
||||
<module>spring-cloud-alicloud-ans</module>
|
||||
<module>spring-cloud-alicloud-schedulerx</module>
|
||||
<module>spring-cloud-alicloud-sms</module>
|
||||
<module>spring-cloud-alibaba-coverage</module>
|
||||
<module>spring-cloud-alibaba-sidecar</module>
|
||||
</modules>
|
||||
|
||||
<dependencyManagement>
|
||||
@@ -318,7 +322,7 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<!-- Checkstyle rules inherited from spring-cloud-build -->
|
||||
<suppressionsLocation>${session.executionRootDirectory}/eclipse/checkstyle-suppressions.xml</suppressionsLocation>
|
||||
<suppressionsLocation>eclipse/checkstyle-suppressions.xml</suppressionsLocation>
|
||||
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||
<consoleOutput>true</consoleOutput>
|
||||
<failsOnError>true</failsOnError>
|
||||
@@ -362,77 +366,15 @@
|
||||
</reporting>
|
||||
|
||||
<profiles>
|
||||
|
||||
<profile>
|
||||
<id>spring</id>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-releases</id>
|
||||
<name>Spring Releases</name>
|
||||
<url>https://repo.spring.io/release</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>spring-releases</id>
|
||||
<name>Spring Releases</name>
|
||||
<url>https://repo.spring.io/libs-release-local</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<id>sona</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Source -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>${maven-source-plugin.version}</version>
|
||||
<version>2.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
@@ -442,10 +384,11 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- Javadoc -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${maven-javadoc-plugin.version}</version>
|
||||
<version>2.9.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
@@ -455,13 +398,14 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- GPG -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>${maven-gpg-plugin.version}</version>
|
||||
<version>1.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
@@ -469,44 +413,15 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>flatten-maven-plugin</artifactId>
|
||||
<version>${flatten-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<updatePomFile>true</updatePomFile>
|
||||
<flattenMode>resolveCiFriendliesOnly</flattenMode>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>flatten</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>flatten</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>flatten.clean</id>
|
||||
<phase>clean</phase>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>sonatype-nexus-snapshots</id>
|
||||
<name>Sonatype Nexus Snapshots</name>
|
||||
<id>sona</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>sonatype-nexus-staging</id>
|
||||
<name>Nexus Release Repository</name>
|
||||
<id>sona</id>
|
||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
@@ -515,5 +430,4 @@
|
||||
</profiles>
|
||||
|
||||
|
||||
|
||||
</project>
|
||||
@@ -2,77 +2,69 @@
|
||||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba</artifactId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
<version>2.2.0.RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>spring-cloud-alibaba-coverage</artifactId>
|
||||
<name>Spring Cloud Alibaba Coverage</name>
|
||||
|
||||
<properties>
|
||||
<spring.cloud.alibaba.version>2.2.0.RELEASE</spring.cloud.alibaba.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-dubbo</artifactId>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-nacos-config</artifactId>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-nacos-discovery</artifactId>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-sentinel</artifactId>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-sentinel-datasource</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-seata</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config-server</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<artifactId>spring-cloud-alicloud-acm</artifactId>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<artifactId>spring-cloud-alicloud-ans</artifactId>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bus-rocketmq</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<artifactId>spring-cloud-alicloud-context</artifactId>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sidecar</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<artifactId>spring-cloud-stream-binder-rocketmq</artifactId>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-dubbo</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<artifactId>spring-cloud-alibaba-seata</artifactId>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -4,27 +4,24 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies-parent</artifactId>
|
||||
<version>2.1.11.RELEASE</version>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>2.2.0.RELEASE</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||
<version>${revision}</version>
|
||||
<version>2.2.0.RELEASE</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Spring Cloud Alibaba Dependencies</name>
|
||||
<description>Spring Cloud Alibaba Dependencies</description>
|
||||
|
||||
<properties>
|
||||
<!-- Project revision -->
|
||||
<revision>2.1.2.RELEASE</revision>
|
||||
|
||||
<sentinel.version>1.7.1</sentinel.version>
|
||||
<oss.version>3.1.0</oss.version>
|
||||
<seata.version>1.1.0</seata.version>
|
||||
<nacos.client.version>1.2.1</nacos.client.version>
|
||||
<seata.version>1.0.0</seata.version>
|
||||
<nacos.client.version>1.1.4</nacos.client.version>
|
||||
<nacos.config.version>0.8.0</nacos.config.version>
|
||||
<acm.version>1.0.9</acm.version>
|
||||
<ans.version>1.0.1</ans.version>
|
||||
@@ -35,18 +32,63 @@
|
||||
<aliyun.java.sdk.dysmsapi>1.1.0</aliyun.java.sdk.dysmsapi>
|
||||
<aliyun.sdk.mns>1.1.8.6</aliyun.sdk.mns>
|
||||
<aliyun.java.sdk.dyvmsapi>1.1.1</aliyun.java.sdk.dyvmsapi>
|
||||
<spring.context.support.version>1.0.6</spring.context.support.version>
|
||||
|
||||
<!-- Maven Plugin Versions -->
|
||||
<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
|
||||
<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
|
||||
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
|
||||
<flatten-maven-plugin.version>1.1.0</flatten-maven-plugin.version>
|
||||
<spring.context.support.version>1.0.5</spring.context.support.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
|
||||
<!-- Alibaba -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>alicloud-context</artifactId>
|
||||
<version>${alicloud.context.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-edas</artifactId>
|
||||
<version>${aliyun.sdk.edas.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||
<version>${aliyun.sdk.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.ans</groupId>
|
||||
<artifactId>ans-sdk</artifactId>
|
||||
<version>${ans.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.edas.acm</groupId>
|
||||
<artifactId>acm-sdk</artifactId>
|
||||
<version>${acm.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.edas</groupId>
|
||||
<artifactId>schedulerX-client</artifactId>
|
||||
<version>${schedulerX.client.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- SMS -->
|
||||
<dependency>
|
||||
<groupId>com.aliyun.mns</groupId>
|
||||
<artifactId>aliyun-sdk-mns</artifactId>
|
||||
<version>${aliyun.sdk.mns}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
|
||||
<version>${aliyun.java.sdk.dysmsapi}</version>
|
||||
</dependency>
|
||||
|
||||
<!--Nacos-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.nacos</groupId>
|
||||
@@ -66,7 +108,6 @@
|
||||
<artifactId>sentinel-core</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-parameter-flow-control</artifactId>
|
||||
@@ -77,43 +118,31 @@
|
||||
<artifactId>sentinel-datasource-extension</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-datasource-apollo</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-datasource-zookeeper</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-datasource-nacos</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-datasource-redis</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-datasource-consul</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-web-servlet</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-zuul-adapter</artifactId>
|
||||
@@ -124,49 +153,41 @@
|
||||
<artifactId>sentinel-spring-cloud-gateway-adapter</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-transport-simple-http</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-annotation-aspectj</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-dubbo-adapter</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-apache-dubbo-adapter</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-reactor-adapter</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-cluster-server-default</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-cluster-client-default</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-spring-webflux-adapter</artifactId>
|
||||
@@ -177,13 +198,13 @@
|
||||
<artifactId>sentinel-api-gateway-adapter-common</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-spring-webmvc-adapter</artifactId>
|
||||
<version>${sentinel.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--Alibaba Seata-->
|
||||
<dependency>
|
||||
<groupId>io.seata</groupId>
|
||||
@@ -191,7 +212,19 @@
|
||||
<version>${seata.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Aliyun OSS dependencies -->
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
<version>${oss.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Own dependencies -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-sentinel</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-sentinel-datasource</artifactId>
|
||||
@@ -202,6 +235,71 @@
|
||||
<artifactId>spring-cloud-alibaba-sentinel-gateway</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alicloud-oss</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-nacos-discovery</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-nacos-config</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-nacos-config-server</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-seata</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alicloud-acm</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alicloud-ans</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alicloud-schedulerx</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alicloud-sms</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alicloud-context</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-stream-binder-rocketmq</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-dubbo</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-sidecar</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Own dependencies - Starters -->
|
||||
<dependency>
|
||||
@@ -209,6 +307,16 @@
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-circuitbreaker-sentinel</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alicloud-oss</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
@@ -233,6 +341,24 @@
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alicloud-ans</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alicloud-acm</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alicloud-schedulerx</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
|
||||
@@ -244,13 +370,19 @@
|
||||
<artifactId>spring-cloud-starter-bus-rocketmq</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sidecar</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- SMS -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alicloud-sms</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Dubbo -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
@@ -270,77 +402,15 @@
|
||||
</dependencyManagement>
|
||||
|
||||
<profiles>
|
||||
|
||||
<profile>
|
||||
<id>spring</id>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-releases</id>
|
||||
<name>Spring Releases</name>
|
||||
<url>https://repo.spring.io/release</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>spring-releases</id>
|
||||
<name>Spring Releases</name>
|
||||
<url>https://repo.spring.io/libs-release-local</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<id>sona</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Source -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>${maven-source-plugin.version}</version>
|
||||
<version>2.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
@@ -350,10 +420,11 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- Javadoc -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${maven-javadoc-plugin.version}</version>
|
||||
<version>2.9.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
@@ -363,13 +434,14 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- GPG -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>${maven-gpg-plugin.version}</version>
|
||||
<version>1.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
@@ -377,47 +449,19 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>flatten-maven-plugin</artifactId>
|
||||
<version>${flatten-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<updatePomFile>true</updatePomFile>
|
||||
<flattenMode>resolveCiFriendliesOnly</flattenMode>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>flatten</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>flatten</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>flatten.clean</id>
|
||||
<phase>clean</phase>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>sonatype-nexus-snapshots</id>
|
||||
<name>Sonatype Nexus Snapshots</name>
|
||||
<id>sona</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>sonatype-nexus-staging</id>
|
||||
<name>Nexus Release Repository</name>
|
||||
<id>sona</id>
|
||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba</artifactId>
|
||||
<version>${revision}</version>
|
||||
<version>2.2.0.RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Spring Cloud Alibaba BOM 包含了它所使用的所有依赖的版本。
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||
<version>2.1.2.RELEASE</version>
|
||||
<version>2.2.0.RELEASE</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
== Spring Cloud Alibaba Sidecar
|
||||
|
||||
`Spring Cloud Alibaba Sidecar` 是一个用来快速**完美整合** Spring Cloud 与 *异构微服务* 的框架,灵感来自
|
||||
https://github.com/spring-cloud/spring-cloud-netflix/tree/master/spring-cloud-netflix-sidecar[Spring Cloud Netflix Sidecar] 。目前支持的服务发现组件:
|
||||
`Spring Cloud Alibaba Sidecar` 是一个用来快速**完美整合** Spring Cloud
|
||||
与 *异构微服务* 的框架,灵感来自
|
||||
https://github.com/spring-cloud/spring-cloud-netflix/tree/master/spring-cloud-netflix-sidecar[Spring
|
||||
Cloud Netflix Sidecar] 。目前支持的服务发现组件:
|
||||
|
||||
* Nacos
|
||||
|
||||
* Consul
|
||||
|
||||
=== 术语
|
||||
@@ -25,26 +26,42 @@ https://github.com/spring-cloud/spring-cloud-netflix/tree/master/spring-cloud-ne
|
||||
|
||||
原因有两点:
|
||||
|
||||
* Spring Cloud子项目 `Spring Cloud Netflix Sidecar` 是可以快速整合异构微服务的。然而,Sidecar只支持使用Eureka作为服务发现,*如果使用其他服务发现组件就抓瞎了*。
|
||||
* *Sidecar是基于Zuul 1.x的*,Spring Cloud官方明确声明,未来将会逐步淘汰Zuul。今年早些时候,我有给Spring Cloud官方提出需求,希望官方实现一个基于Spring Cloud Gateway的新一代Sidecar,然而官方表示并没有该计划。详见:https://github.com/spring-cloud/spring-cloud-gateway/issues/735
|
||||
* Spring Cloud子项目 `Spring Cloud Netflix Sidecar`
|
||||
是可以快速整合异构微服务的。然而,Sidecar只支持使用Eureka作为服务发现,*如果使用其他服务发现组件就抓瞎了*。
|
||||
* *Sidecar是基于Zuul 1.x的*,Spring
|
||||
Cloud官方明确声明,未来将会逐步淘汰Zuul。今年早些时候,我有给Spring
|
||||
Cloud官方提出需求,希望官方实现一个基于Spring Cloud
|
||||
Gateway的新一代Sidecar,然而官方表示并没有该计划。详见:https://github.com/spring-cloud/spring-cloud-gateway/issues/735
|
||||
|
||||
既然没有,索性自己写了。
|
||||
|
||||
==== 为什么不用Service Mesh?
|
||||
|
||||
* 目前Mesh主要使用场景在Kubernetes领域(Istio、Linkerd)等,大多将Kubernetes作为First Class支持,虽然Istio也可部署在非Kubernetes环境),而目前业界,Spring Cloud应用未必有试试Mesh的环境;
|
||||
* 使用Alibaba Sidecar一个小组件就能解决问题了(核心代码不超过200行),引入整套Mesh方案,颇有点屠龙刀杀黄鳝的意思。
|
||||
* 目前Mesh主要使用场景在Kubernetes领域(Istio、Linkerd
|
||||
2等,大多将Kubernetes作为First
|
||||
Class支持,虽然Istio也可部署在非Kubernetes环境),而目前业界,Spring
|
||||
Cloud应用未必有试试Mesh的环境;
|
||||
* 使用Alibaba
|
||||
Sidecar一个小组件就能解决问题了(核心代码不超过200行),引入整套Mesh方案,颇有点屠龙刀杀黄鳝的意思。
|
||||
|
||||
=== 原理
|
||||
|
||||
* Alibaba
|
||||
Sidecar根据配置的异构微服务的IP、端口等信息,*将异构微服务的IP/端口注册到服务发现组件上*。
|
||||
* Alibaba Sidecar实现了 *健康检查* ,Alibaba Sidecar会定时检测异构微服务是否健康。如果发现异构微服务不健康,Alibaba Sidecar会自动将代表异构微服务的Alibaba Sidecar实例下线;如果异构微服务恢复正常,则会自动上线。最长延迟是30秒,详见 `Alibaba SidecarChecker#check` 。
|
||||
Sidecar根据配置的异构微服务的IP、端口等信息,*将异构微服务的IP/端口注册到服务发现组件上*
|
||||
。
|
||||
* Alibaba Sidecar实现了 *健康检查* ,Alibaba
|
||||
Sidecar会定时检测异构微服务是否健康。如果发现异构微服务不健康,Alibaba
|
||||
Sidecar会自动将代表异构微服务的Alibaba
|
||||
Sidecar实例下线;如果异构微服务恢复正常,则会自动上线。最长延迟是30秒,详见
|
||||
`Alibaba SidecarChecker#check` 。
|
||||
|
||||
=== 要求
|
||||
|
||||
* 【必须】你的异构微服务需使用HTTP通信。这一点严格来说不算要求,因为Spring Cloud本身就是基于HTTP的;
|
||||
* 【可选】如果微服务配置了 `sidecar.health-check-url`,则表示开启健康检查,此时,你的异构微服务需实现健康检查(可以是空实现,只要暴露一个端点,返回类似 `{"status": "UP"}` 的字符串即可)。
|
||||
* 【必须】你的异构微服务需使用HTTP通信。这一点严格来说不算要求,因为Spring
|
||||
Cloud本身就是基于HTTP的;
|
||||
* 【可选】如果微服务配置了 `sidecar.health-check-url`
|
||||
,则表示开启健康检查,此时,你的异构微服务需实现健康检查(可以是空实现,只要暴露一个端点,返回类似
|
||||
`{"status": "UP"}` 的字符串即可)。
|
||||
|
||||
=== 使用示例
|
||||
|
||||
@@ -92,7 +109,8 @@ endpoint:
|
||||
show-details: always
|
||||
----
|
||||
+
|
||||
配置比较简单,就是把Alibaba Sidecar注册到Nacos上,然后添加了几行Alibaba Sidecar的配置。
|
||||
配置比较简单,就是把Alibaba Sidecar注册到Nacos上,然后添加了几行Alibaba
|
||||
Sidecar的配置。
|
||||
|
||||
==== 异构微服务
|
||||
|
||||
@@ -132,13 +150,16 @@ server.listen(8060, function() {
|
||||
|
||||
===== 测试1:Spring Cloud微服务完美调用异构微服务
|
||||
|
||||
为你的Spring Cloud微服务整合Ribbon,然后构建 `http://node-service/\\**`,就可以请求到异构微服务的 `/**` 了。
|
||||
为你的Spring Cloud微服务整合Ribbon,然后构建 `http://node-service/**`
|
||||
,就可以请求到异构微服务的 `/**` 了。
|
||||
|
||||
示例:
|
||||
|
||||
Ribbon请求 `http://node-service/` 会请求到 `http://localhost:8060/`,以此类推。
|
||||
Ribbon请求 `http://node-service/` 会请求到 `http://localhost:8060/`
|
||||
,以此类推。
|
||||
|
||||
至于断路器,正常为你的Spring Cloud微服务整合Sentinel或者Hystirx、Resilience4J即可 。
|
||||
至于断路器,正常为你的Spring
|
||||
Cloud微服务整合Sentinel或者Hystirx、Resilience4J即可 。
|
||||
|
||||
===== 测试2:异构微服务完美调用Spring Cloud微服务
|
||||
|
||||
@@ -146,13 +167,18 @@ Ribbon请求 `http://node-service/` 会请求到 `http://localhost:8060/`,以
|
||||
|
||||
示例:
|
||||
|
||||
如果你有一个Spring Cloud微服务叫做 `spring-cloud-microservice`,那么NodeJS应用只需构建 `http://localhost:8070/spring-cloud-microservice/\\**` ,Alibaba Sidecar就会把请求转发到 `spring-cloud-microservice` 的 `/**` 。
|
||||
如果你有一个Spring Cloud微服务叫做 `spring-cloud-microservice`
|
||||
,那么NodeJS应用只需构建
|
||||
`http://localhost:8070/spring-cloud-microservice/**` ,Alibaba
|
||||
Sidecar就会把请求转发到 `spring-cloud-microservice` 的 `/**` 。
|
||||
|
||||
而Spring Cloud Gateway是整合了Ribbon的,所以实现了负载均衡;Spring Cloud Gateway还可以整合Sentinel或者Hystirx、Resilience4J,所以也带有了断路器。
|
||||
而Spring Cloud Gateway是整合了Ribbon的,所以实现了负载均衡;Spring Cloud
|
||||
Gateway还可以整合Sentinel或者Hystirx、Resilience4J,所以也带有了断路器。
|
||||
|
||||
=== Alibaba Sidecar优缺点分析
|
||||
|
||||
Alibaba Sidecar的设计和Sidecar基本一致,优缺点和Sidecar的优缺点也是一样的。
|
||||
Alibaba
|
||||
Sidecar的设计和Sidecar基本一致,优缺点和Sidecar的优缺点也是一样的。
|
||||
|
||||
优点:
|
||||
|
||||
@@ -161,5 +187,8 @@ Alibaba Sidecar的设计和Sidecar基本一致,优缺点和Sidecar的优缺点
|
||||
|
||||
缺点:
|
||||
|
||||
* 每接入一个异构微服务实例,都需要额外部署一个Alibaba Sidecar实例,增加了部署成本(虽然这个成本在Kubernetes环境中几乎可以忽略不计(只需将Alibaba Sidecar实例和异构微服务作为一个Pod部署即可));
|
||||
* 异构微服务调用Spring Cloud微服务时,本质是把Alibaba Sidecar当网关在使用,经过了一层转发,性能有一定下降。
|
||||
* 每接入一个异构微服务实例,都需要额外部署一个Alibaba
|
||||
Sidecar实例,增加了部署成本(虽然这个成本在Kubernetes环境中几乎可以忽略不计(只需将Alibaba
|
||||
Sidecar实例和异构微服务作为一个Pod部署即可));
|
||||
* 异构微服务调用Spring Cloud微服务时,本质是把Alibaba
|
||||
Sidecar当网关在使用,经过了一层转发,性能有一定下降。
|
||||
|
||||
@@ -8,7 +8,7 @@ If you’re a Maven Central user, add our BOM to your pom.xml <dependencyManagem
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||
<version>2.1.2.RELEASE</version>
|
||||
<version>2.2.0.RELEASE</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
+30
-12
@@ -2,28 +2,21 @@
|
||||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<parent>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
||||
<version>${revision}</version>
|
||||
<artifactId>spring-cloud-alibaba</artifactId>
|
||||
<version>2.2.0.RELEASE</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>spring-cloud-starter-dubbo</artifactId>
|
||||
<name>Spring Cloud Starter Dubbo</name>
|
||||
<artifactId>spring-cloud-alibaba-dubbo</artifactId>
|
||||
<name>Spring Cloud Alibaba Dubbo</name>
|
||||
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- Spring Boot dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-actuator</artifactId>
|
||||
@@ -192,6 +185,31 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>${jacoco.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>jacoco-initialize</id>
|
||||
<goals>
|
||||
<goal>prepare-agent</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>jacoco-site</id>
|
||||
<phase>test</phase>
|
||||
<goals>
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
+2
-1
@@ -31,7 +31,8 @@ import org.springframework.context.annotation.PropertySource;
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
@ConditionalOnClass(name = "org.springframework.boot.actuate.endpoint.annotation.Endpoint")
|
||||
@ConditionalOnClass(
|
||||
name = "org.springframework.boot.actuate.endpoint.annotation.Endpoint")
|
||||
@PropertySource("classpath:/META-INF/dubbo/default/actuator-endpoints.properties")
|
||||
@ManagementContextConfiguration
|
||||
public class DubboMetadataEndpointAutoConfiguration {
|
||||
+1
-1
@@ -30,7 +30,7 @@ import org.springframework.cloud.client.loadbalancer.LoadBalanced;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.DEFAULT_RETRIES;
|
||||
import static org.apache.dubbo.rpc.cluster.Constants.DEFAULT_RETRIES;
|
||||
|
||||
/**
|
||||
* {@link DubboTransported @DubboTransported} annotation indicates that the traditional
|
||||
+1
-1
@@ -60,7 +60,7 @@ import org.springframework.web.client.RestTemplate;
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass(name = { "org.springframework.web.client.RestTemplate" })
|
||||
@AutoConfigureAfter(name = {
|
||||
"org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration" })
|
||||
+1
-1
@@ -51,7 +51,7 @@ import org.springframework.util.CollectionUtils;
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Import({ DubboServiceMetadataRepository.class, IntrospectiveDubboMetadataService.class,
|
||||
DubboMetadataServiceExporter.class, JSONUtils.class })
|
||||
public class DubboMetadataAutoConfiguration {
|
||||
+3
-3
@@ -35,9 +35,9 @@ import static com.alibaba.cloud.dubbo.autoconfigure.DubboOpenFeignAutoConfigurat
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
@ConditionalOnClass(name = { "feign.Feign", TARGETER_CLASS_NAME })
|
||||
@AutoConfigureAfter(name = {
|
||||
"org.springframework.cloud.openfeign.FeignAutoConfiguration" })
|
||||
@Configuration
|
||||
@AutoConfigureAfter(
|
||||
name = { "org.springframework.cloud.openfeign.FeignAutoConfiguration" })
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class DubboOpenFeignAutoConfiguration {
|
||||
|
||||
/**
|
||||
+2
-2
@@ -39,7 +39,7 @@ import org.springframework.core.env.PropertyResolver;
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableConfigurationProperties(DubboCloudProperties.class)
|
||||
public class DubboServiceAutoConfiguration {
|
||||
|
||||
@@ -60,7 +60,7 @@ public class DubboServiceAutoConfiguration {
|
||||
return environment;
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Import({ DubboGenericServiceExecutionContextFactory.class,
|
||||
RequestParamServiceParameterResolver.class,
|
||||
RequestBodyServiceParameterResolver.class,
|
||||
+11
-10
@@ -94,14 +94,15 @@ import static org.springframework.util.StringUtils.hasText;
|
||||
* @see Configuration
|
||||
* @see DiscoveryClient
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass(name = "org.springframework.cloud.client.discovery.DiscoveryClient")
|
||||
@ConditionalOnProperty(name = "spring.cloud.discovery.enabled", matchIfMissing = true)
|
||||
@AutoConfigureAfter(name = { EUREKA_CLIENT_AUTO_CONFIGURATION_CLASS_NAME,
|
||||
ZOOKEEPER_DISCOVERY_AUTO_CONFIGURATION_CLASS_NAME,
|
||||
CONSUL_DISCOVERY_AUTO_CONFIGURATION_CLASS_NAME,
|
||||
NACOS_DISCOVERY_AUTO_CONFIGURATION_CLASS_NAME }, value = {
|
||||
DubboServiceRegistrationAutoConfiguration.class })
|
||||
@AutoConfigureAfter(
|
||||
name = { EUREKA_CLIENT_AUTO_CONFIGURATION_CLASS_NAME,
|
||||
ZOOKEEPER_DISCOVERY_AUTO_CONFIGURATION_CLASS_NAME,
|
||||
CONSUL_DISCOVERY_AUTO_CONFIGURATION_CLASS_NAME,
|
||||
NACOS_DISCOVERY_AUTO_CONFIGURATION_CLASS_NAME },
|
||||
value = { DubboServiceRegistrationAutoConfiguration.class })
|
||||
public class DubboServiceDiscoveryAutoConfiguration {
|
||||
|
||||
/**
|
||||
@@ -261,7 +262,7 @@ public class DubboServiceDiscoveryAutoConfiguration {
|
||||
/**
|
||||
* Eureka Customized Configuration.
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnBean(name = EUREKA_CLIENT_AUTO_CONFIGURATION_CLASS_NAME)
|
||||
public class EurekaConfiguration {
|
||||
|
||||
@@ -292,7 +293,7 @@ public class DubboServiceDiscoveryAutoConfiguration {
|
||||
/**
|
||||
* Zookeeper Customized Configuration.
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnBean(name = ZOOKEEPER_DISCOVERY_AUTO_CONFIGURATION_CLASS_NAME)
|
||||
@Aspect
|
||||
public class ZookeeperConfiguration
|
||||
@@ -489,7 +490,7 @@ public class DubboServiceDiscoveryAutoConfiguration {
|
||||
/**
|
||||
* Consul Customized Configuration.
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnBean(name = CONSUL_DISCOVERY_AUTO_CONFIGURATION_CLASS_NAME)
|
||||
class ConsulConfiguration {
|
||||
|
||||
@@ -498,7 +499,7 @@ public class DubboServiceDiscoveryAutoConfiguration {
|
||||
/**
|
||||
* Nacos Customized Configuration.
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnBean(name = NACOS_DISCOVERY_AUTO_CONFIGURATION_CLASS_NAME)
|
||||
class NacosConfiguration {
|
||||
|
||||
+7
-6
@@ -64,13 +64,14 @@ import static org.springframework.util.ObjectUtils.isEmpty;
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Import({ DubboServiceRegistrationEventPublishingAspect.class })
|
||||
@ConditionalOnProperty(value = "spring.cloud.service-registry.auto-registration.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "spring.cloud.service-registry.auto-registration.enabled",
|
||||
matchIfMissing = true)
|
||||
@AutoConfigureAfter(name = { EUREKA_CLIENT_AUTO_CONFIGURATION_CLASS_NAME,
|
||||
CONSUL_AUTO_SERVICE_AUTO_CONFIGURATION_CLASS_NAME,
|
||||
"org.springframework.cloud.client.serviceregistry.AutoServiceRegistrationAutoConfiguration" }, value = {
|
||||
DubboMetadataAutoConfiguration.class })
|
||||
"org.springframework.cloud.client.serviceregistry.AutoServiceRegistrationAutoConfiguration" },
|
||||
value = { DubboMetadataAutoConfiguration.class })
|
||||
public class DubboServiceRegistrationAutoConfiguration {
|
||||
|
||||
/**
|
||||
@@ -129,7 +130,7 @@ public class DubboServiceRegistrationAutoConfiguration {
|
||||
}
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnBean(name = EUREKA_CLIENT_AUTO_CONFIGURATION_CLASS_NAME)
|
||||
@Aspect
|
||||
class EurekaConfiguration implements SmartInitializingSingleton {
|
||||
@@ -165,7 +166,7 @@ public class DubboServiceRegistrationAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnBean(name = CONSUL_AUTO_SERVICE_AUTO_CONFIGURATION_CLASS_NAME)
|
||||
@AutoConfigureOrder
|
||||
class ConsulConfiguration {
|
||||
+5
-4
@@ -51,9 +51,10 @@ import static com.alibaba.cloud.dubbo.autoconfigure.DubboServiceRegistrationAuto
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnNotWebApplication
|
||||
@ConditionalOnProperty(value = "spring.cloud.service-registry.auto-registration.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "spring.cloud.service-registry.auto-registration.enabled",
|
||||
matchIfMissing = true)
|
||||
@AutoConfigureAfter(DubboServiceRegistrationAutoConfiguration.class)
|
||||
@Aspect
|
||||
public class DubboServiceRegistrationNonWebApplicationAutoConfiguration {
|
||||
@@ -115,7 +116,7 @@ public class DubboServiceRegistrationNonWebApplicationAutoConfiguration {
|
||||
}
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnBean(name = ZOOKEEPER_AUTO_SERVICE_AUTO_CONFIGURATION_CLASS_NAME)
|
||||
class ZookeeperConfiguration implements SmartInitializingSingleton {
|
||||
|
||||
@@ -137,7 +138,7 @@ public class DubboServiceRegistrationNonWebApplicationAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnBean(name = CONSUL_AUTO_SERVICE_AUTO_CONFIGURATION_CLASS_NAME)
|
||||
class ConsulConfiguration {
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import static com.alibaba.cloud.dubbo.registry.SpringCloudRegistryFactory.PROTOCOL;
|
||||
import static com.alibaba.spring.util.PropertySourcesUtils.getSubProperties;
|
||||
import static org.apache.dubbo.config.spring.util.PropertySourcesUtils.getPrefixedProperties;
|
||||
|
||||
/**
|
||||
* Missing {@link SpringCloudRegistry} Property {@link Condition}.
|
||||
@@ -61,7 +61,7 @@ public class MissingSpringCloudRegistryConfigPropertyCondition
|
||||
"'spring-cloud' protocol was found from 'dubbo.registry.address'");
|
||||
}
|
||||
|
||||
Map<String, Object> properties = getSubProperties(
|
||||
Map<String, Object> properties = getPrefixedProperties(
|
||||
environment.getPropertySources(), "dubbo.registries.");
|
||||
|
||||
boolean found = properties.entrySet().stream().anyMatch(entry -> {
|
||||
+6
-6
@@ -34,8 +34,8 @@ import org.springframework.core.env.PropertySource;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import static com.alibaba.spring.util.PropertySourcesUtils.getSubProperties;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.DEFAULT_PROTOCOL;
|
||||
import static org.apache.dubbo.config.spring.util.PropertySourcesUtils.getPrefixedProperties;
|
||||
|
||||
/**
|
||||
* Dubbo {@link WebApplicationType#NONE Non-Web Application}
|
||||
@@ -84,7 +84,7 @@ public class DubboNonWebApplicationEnvironmentPostProcessor
|
||||
|
||||
@Override
|
||||
public void postProcessEnvironment(ConfigurableEnvironment environment,
|
||||
SpringApplication application) {
|
||||
SpringApplication application) {
|
||||
WebApplicationType webApplicationType = application.getWebApplicationType();
|
||||
|
||||
if (!WebApplicationType.NONE.equals(webApplicationType)) { // Just works in
|
||||
@@ -117,7 +117,7 @@ public class DubboNonWebApplicationEnvironmentPostProcessor
|
||||
* @param defaultProperties defaultProperties
|
||||
*/
|
||||
private void resetServerPort(ConfigurableEnvironment environment,
|
||||
Map<String, Object> defaultProperties) {
|
||||
Map<String, Object> defaultProperties) {
|
||||
|
||||
String serverPort = environment.getProperty(SERVER_PORT_PROPERTY_NAME,
|
||||
environment.getProperty(PORT_PROPERTY_NAME));
|
||||
@@ -149,7 +149,7 @@ public class DubboNonWebApplicationEnvironmentPostProcessor
|
||||
|
||||
String restPort = null;
|
||||
|
||||
Map<String, Object> subProperties = getSubProperties(
|
||||
Map<String, Object> subProperties = getPrefixedProperties(
|
||||
environment.getPropertySources(), PROTOCOLS_PROPERTY_NAME_PREFIX);
|
||||
|
||||
Properties properties = new Properties();
|
||||
@@ -181,7 +181,7 @@ public class DubboNonWebApplicationEnvironmentPostProcessor
|
||||
}
|
||||
|
||||
private void setServerPort(ConfigurableEnvironment environment, String serverPort,
|
||||
Map<String, Object> defaultProperties) {
|
||||
Map<String, Object> defaultProperties) {
|
||||
if (serverPort == null) {
|
||||
return;
|
||||
}
|
||||
@@ -196,7 +196,7 @@ public class DubboNonWebApplicationEnvironmentPostProcessor
|
||||
* @param map Default Dubbo Properties
|
||||
*/
|
||||
private void addOrReplace(MutablePropertySources propertySources,
|
||||
Map<String, Object> map) {
|
||||
Map<String, Object> map) {
|
||||
MapPropertySource target = null;
|
||||
if (propertySources.contains(PROPERTY_SOURCE_NAME)) {
|
||||
PropertySource<?> source = propertySources.get(PROPERTY_SOURCE_NAME);
|
||||
+34
-70
@@ -22,7 +22,6 @@ import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
@@ -190,7 +189,7 @@ public class DubboServiceMetadataRepository
|
||||
// //
|
||||
|
||||
private static <K, V> Map<K, V> getMap(Map<String, Map<K, V>> repository,
|
||||
String key) {
|
||||
String key) {
|
||||
return getOrDefault(repository, key, newHashMap());
|
||||
}
|
||||
|
||||
@@ -290,11 +289,9 @@ public class DubboServiceMetadataRepository
|
||||
serviceName);
|
||||
}
|
||||
|
||||
if (initSubscribedDubboMetadataService(serviceName)) {
|
||||
// mark this service name having been initialized
|
||||
initializedServices.add(serviceName);
|
||||
}
|
||||
|
||||
initSubscribedDubboMetadataService(serviceName);
|
||||
// mark this service name having been initialized
|
||||
initializedServices.add(serviceName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -303,19 +300,12 @@ public class DubboServiceMetadataRepository
|
||||
* Remove the metadata and initialized service of Dubbo Services if no there is no
|
||||
* service instance.
|
||||
* @param serviceName the service name
|
||||
* @param url the meta service url
|
||||
*/
|
||||
public void removeMetadataAndInitializedService(String serviceName, URL url) {
|
||||
public void removeMetadataAndInitializedService(String serviceName) {
|
||||
synchronized (monitor) {
|
||||
initializedServices.remove(serviceName);
|
||||
dubboRestServiceMetadataRepository.remove(serviceName);
|
||||
// fix #1260 if the subscribedDubboMetadataServiceURLs removed fail,old meta
|
||||
// information will be retained
|
||||
if (DubboMetadataService.class.getName().equals(url.getServiceInterface())) {
|
||||
String serviceKey = url.getServiceKey();
|
||||
subscribedDubboMetadataServiceURLs.remove(serviceKey);
|
||||
}
|
||||
|
||||
subscribedDubboMetadataServiceURLs.remove(serviceName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,7 +333,7 @@ public class DubboServiceMetadataRepository
|
||||
}
|
||||
|
||||
private void addDubboMetadataServiceURLsMetadata(Map<String, String> metadata,
|
||||
List<URL> dubboMetadataServiceURLs) {
|
||||
List<URL> dubboMetadataServiceURLs) {
|
||||
String dubboMetadataServiceURLsJSON = jsonUtils.toJSON(dubboMetadataServiceURLs);
|
||||
metadata.put(DUBBO_METADATA_SERVICE_URLS_PROPERTY_NAME,
|
||||
dubboMetadataServiceURLsJSON);
|
||||
@@ -390,7 +380,7 @@ public class DubboServiceMetadataRepository
|
||||
}
|
||||
|
||||
public List<URL> findSubscribedDubboMetadataServiceURLs(String serviceName,
|
||||
String group, String version, String protocol) {
|
||||
String group, String version, String protocol) {
|
||||
String serviceKey = URL.buildKey(serviceName, group, version);
|
||||
|
||||
List<URL> urls = null;
|
||||
@@ -403,11 +393,9 @@ public class DubboServiceMetadataRepository
|
||||
return emptyList();
|
||||
}
|
||||
|
||||
return hasText(protocol)
|
||||
? urls.stream()
|
||||
return hasText(protocol) ? urls.stream()
|
||||
.filter(url -> url.getProtocol().equalsIgnoreCase(protocol))
|
||||
.collect(Collectors.toList())
|
||||
: unmodifiableList(urls);
|
||||
.collect(Collectors.toList()) : unmodifiableList(urls);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -472,7 +460,7 @@ public class DubboServiceMetadataRepository
|
||||
}
|
||||
|
||||
public Integer getDubboProtocolPort(ServiceInstance serviceInstance,
|
||||
String protocol) {
|
||||
String protocol) {
|
||||
String protocolProperty = getDubboProtocolPropertyName(protocol);
|
||||
Map<String, String> metadata = serviceInstance.getMetadata();
|
||||
String protocolPort = metadata.get(protocolProperty);
|
||||
@@ -480,7 +468,7 @@ public class DubboServiceMetadataRepository
|
||||
}
|
||||
|
||||
public List<URL> getExportedURLs(String serviceInterface, String group,
|
||||
String version) {
|
||||
String version) {
|
||||
String serviceKey = URL.buildKey(serviceInterface, group, version);
|
||||
return allExportedURLs.getOrDefault(serviceKey, Collections.emptyList());
|
||||
}
|
||||
@@ -537,7 +525,7 @@ public class DubboServiceMetadataRepository
|
||||
* @return {@link DubboRestServiceMetadata} if matched, or <code>null</code>
|
||||
*/
|
||||
public DubboRestServiceMetadata get(String serviceName,
|
||||
RequestMetadata requestMetadata) {
|
||||
RequestMetadata requestMetadata) {
|
||||
return match(dubboRestServiceMetadataRepository, serviceName, requestMetadata);
|
||||
}
|
||||
|
||||
@@ -554,7 +542,7 @@ public class DubboServiceMetadataRepository
|
||||
}
|
||||
|
||||
private <T> T match(Map<String, Map<RequestMetadataMatcher, T>> repository,
|
||||
String serviceName, RequestMetadata requestMetadata) {
|
||||
String serviceName, RequestMetadata requestMetadata) {
|
||||
|
||||
Map<RequestMetadataMatcher, T> map = repository.get(serviceName);
|
||||
|
||||
@@ -626,47 +614,24 @@ public class DubboServiceMetadataRepository
|
||||
subscribedServices.remove(currentApplicationName);
|
||||
}
|
||||
|
||||
protected Boolean initSubscribedDubboMetadataService(String serviceName) {
|
||||
// this need to judge whether the initialization is successful or not. The failed
|
||||
// initialization will not change the initializedServices
|
||||
Optional<ServiceInstance> optionalServiceInstance = metadataServiceInstanceSelector
|
||||
.choose(discoveryClient.getInstances(serviceName));
|
||||
if (!((Optional) optionalServiceInstance).isPresent()) {
|
||||
return false;
|
||||
}
|
||||
ServiceInstance serviceInstance = optionalServiceInstance.get();
|
||||
if (null == serviceInstance) {
|
||||
return false;
|
||||
}
|
||||
List<URL> dubboMetadataServiceURLs = getDubboMetadataServiceURLs(serviceInstance);
|
||||
if (dubboMetadataServiceURLs.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
for (URL dubboMetadataServiceURL : dubboMetadataServiceURLs) {
|
||||
try {
|
||||
initSubscribedDubboMetadataServiceURL(dubboMetadataServiceURL);
|
||||
DubboMetadataService dubboMetadataService = dubboMetadataConfigServiceProxy
|
||||
.getProxy(serviceName);
|
||||
if (dubboMetadataService == null) {
|
||||
dubboMetadataService = initDubboMetadataServiceProxy(
|
||||
dubboMetadataServiceURL);
|
||||
}
|
||||
|
||||
if (dubboMetadataService == null) {
|
||||
removeMetadataAndInitializedService(serviceName,
|
||||
dubboMetadataServiceURL);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Throwable e) {
|
||||
if (logger.isErrorEnabled()) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
protected void initSubscribedDubboMetadataService(String serviceName) {
|
||||
metadataServiceInstanceSelector.choose(discoveryClient.getInstances(serviceName))
|
||||
.map(this::getDubboMetadataServiceURLs)
|
||||
.ifPresent(dubboMetadataServiceURLs -> {
|
||||
dubboMetadataServiceURLs.forEach(dubboMetadataServiceURL -> {
|
||||
try {
|
||||
initSubscribedDubboMetadataServiceURL(
|
||||
dubboMetadataServiceURL);
|
||||
initDubboMetadataServiceProxy(dubboMetadataServiceURL);
|
||||
}
|
||||
catch (Throwable e) {
|
||||
if (logger.isErrorEnabled()) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
initDubboRestServiceMetadataRepository(serviceName);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void initSubscribedDubboMetadataServiceURL(URL dubboMetadataServiceURL) {
|
||||
@@ -675,13 +640,11 @@ public class DubboServiceMetadataRepository
|
||||
subscribedDubboMetadataServiceURLs.add(serviceKey, dubboMetadataServiceURL);
|
||||
}
|
||||
|
||||
private DubboMetadataService initDubboMetadataServiceProxy(
|
||||
URL dubboMetadataServiceURL) {
|
||||
private void initDubboMetadataServiceProxy(URL dubboMetadataServiceURL) {
|
||||
String serviceName = dubboMetadataServiceURL.getParameter(APPLICATION_KEY);
|
||||
String version = dubboMetadataServiceURL.getParameter(VERSION_KEY);
|
||||
// Initialize DubboMetadataService with right version
|
||||
return dubboMetadataConfigServiceProxy.initProxy(serviceName, version);
|
||||
|
||||
dubboMetadataConfigServiceProxy.initProxy(serviceName, version);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -689,4 +652,5 @@ public class DubboServiceMetadataRepository
|
||||
ApplicationEventPublisher applicationEventPublisher) {
|
||||
this.applicationEventPublisher = applicationEventPublisher;
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -153,7 +153,7 @@ public class DubboServiceBeanMetadataResolver
|
||||
* Select feign contract methods
|
||||
* <p>
|
||||
* extract some code from
|
||||
* {@link Contract.BaseContract#parseAndValidatateMetadata(Class)}.
|
||||
* {@link Contract.BaseContract#parseAndValidatateMetadata(java.lang.Class)}.
|
||||
* @param targetType class of type
|
||||
* @return non-null
|
||||
*/
|
||||
+25
-52
@@ -48,11 +48,9 @@ import static java.util.Collections.emptyList;
|
||||
import static org.apache.dubbo.common.URLBuilder.from;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.GROUP_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.PROTOCOL_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.PROVIDER;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.PROVIDER_SIDE;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.SIDE_KEY;
|
||||
import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY;
|
||||
import static org.apache.dubbo.common.constants.RegistryConstants.CATEGORY_KEY;
|
||||
import static org.apache.dubbo.common.constants.RegistryConstants.EMPTY_PROTOCOL;
|
||||
import static org.apache.dubbo.registry.Constants.ADMIN_PROTOCOL;
|
||||
import static org.springframework.util.StringUtils.hasText;
|
||||
@@ -98,10 +96,10 @@ public abstract class AbstractSpringCloudRegistry extends FailbackRegistry {
|
||||
private final ConfigurableApplicationContext applicationContext;
|
||||
|
||||
public AbstractSpringCloudRegistry(URL url, DiscoveryClient discoveryClient,
|
||||
DubboServiceMetadataRepository dubboServiceMetadataRepository,
|
||||
DubboMetadataServiceProxy dubboMetadataConfigServiceProxy,
|
||||
JSONUtils jsonUtils, DubboGenericServiceFactory dubboGenericServiceFactory,
|
||||
ConfigurableApplicationContext applicationContext) {
|
||||
DubboServiceMetadataRepository dubboServiceMetadataRepository,
|
||||
DubboMetadataServiceProxy dubboMetadataConfigServiceProxy,
|
||||
JSONUtils jsonUtils, DubboGenericServiceFactory dubboGenericServiceFactory,
|
||||
ConfigurableApplicationContext applicationContext) {
|
||||
super(url);
|
||||
this.servicesLookupInterval = url
|
||||
.getParameter(SERVICES_LOOKUP_INTERVAL_PARAM_NAME, 60L);
|
||||
@@ -163,13 +161,6 @@ public abstract class AbstractSpringCloudRegistry extends FailbackRegistry {
|
||||
}
|
||||
else if (isDubboMetadataServiceURL(url)) { // for DubboMetadataService
|
||||
subscribeDubboMetadataServiceURLs(url, listener);
|
||||
if (from(url).getParameter(CATEGORY_KEY) != null
|
||||
&& from(url).getParameter(CATEGORY_KEY).contains(PROVIDER)) {
|
||||
// Fix #1259 and #753 Listene meta service change events to remove useless
|
||||
// clients
|
||||
registerServiceInstancesChangedEventListener(url, listener);
|
||||
}
|
||||
|
||||
}
|
||||
else { // for general Dubbo Services
|
||||
subscribeDubboServiceURLs(url, listener);
|
||||
@@ -190,7 +181,7 @@ public abstract class AbstractSpringCloudRegistry extends FailbackRegistry {
|
||||
* @param listener {@link NotifyListener}
|
||||
*/
|
||||
private void registerServiceInstancesChangedEventListener(URL url,
|
||||
NotifyListener listener) {
|
||||
NotifyListener listener) {
|
||||
String listenerId = generateId(url);
|
||||
if (registerListeners.add(listenerId)) {
|
||||
applicationContext.addApplicationListener(
|
||||
@@ -217,8 +208,8 @@ public abstract class AbstractSpringCloudRegistry extends FailbackRegistry {
|
||||
}
|
||||
|
||||
protected void subscribeDubboServiceURL(URL url, NotifyListener listener,
|
||||
String serviceName,
|
||||
Function<String, Collection<ServiceInstance>> serviceInstancesFunction) {
|
||||
String serviceName,
|
||||
Function<String, Collection<ServiceInstance>> serviceInstancesFunction) {
|
||||
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info(
|
||||
@@ -231,38 +222,16 @@ public abstract class AbstractSpringCloudRegistry extends FailbackRegistry {
|
||||
Collection<ServiceInstance> serviceInstances = serviceInstancesFunction
|
||||
.apply(serviceName);
|
||||
|
||||
// issue : ReStarting a consumer and then starting a provider does not
|
||||
// automatically discover the registration
|
||||
// fix https://github.com/alibaba/spring-cloud-alibaba/issues/753
|
||||
// Re-obtain the latest list of available metadata address here, ip or port may
|
||||
// change.
|
||||
// by https://github.com/wangzihaogithub
|
||||
// When the last service provider is closed, 【fix 1259】while close the
|
||||
// channel,when up a new provider then repository.initializeMetadata(serviceName)
|
||||
// will throw Exception.
|
||||
// dubboMetadataConfigServiceProxy.removeProxy(serviceName);
|
||||
// repository.removeMetadataAndInitializedService(serviceName);
|
||||
// dubboGenericServiceFactory.destroy(serviceName);
|
||||
// repository.initializeMetadata(serviceName);
|
||||
if (CollectionUtils.isEmpty(serviceInstances)) {
|
||||
dubboMetadataConfigServiceProxy.removeProxy(serviceName);
|
||||
repository.removeMetadataAndInitializedService(serviceName);
|
||||
dubboGenericServiceFactory.destroy(serviceName);
|
||||
if (logger.isWarnEnabled()) {
|
||||
logger.warn(
|
||||
"There is no instance from service[name : {}], and then Dubbo Service[key : {}] will not be "
|
||||
+ "available , please make sure the further impact",
|
||||
serviceName, url.getServiceKey());
|
||||
}
|
||||
if (isDubboMetadataServiceURL(url)) {
|
||||
// if meta service change, and serviceInstances is zero, will clean up
|
||||
// information about this client
|
||||
dubboMetadataConfigServiceProxy.removeProxy(serviceName);
|
||||
repository.removeMetadataAndInitializedService(serviceName, url);
|
||||
dubboGenericServiceFactory.destroy(serviceName);
|
||||
String listenerId = generateId(url);
|
||||
// The metaservice will restart the new listener. It needs to be optimized
|
||||
// to see whether the original listener can be reused.
|
||||
this.registerListeners.remove(listenerId);
|
||||
}
|
||||
|
||||
/**
|
||||
* URLs with {@link RegistryConstants#EMPTY_PROTOCOL}
|
||||
*/
|
||||
@@ -274,14 +243,21 @@ public abstract class AbstractSpringCloudRegistry extends FailbackRegistry {
|
||||
listener.notify(allSubscribedURLs);
|
||||
return;
|
||||
}
|
||||
if (isDubboMetadataServiceURL(url)) {
|
||||
// Prevent duplicate generation of DubboMetadataService
|
||||
return;
|
||||
}
|
||||
repository.initializeMetadata(serviceName);
|
||||
|
||||
DubboMetadataService dubboMetadataService = dubboMetadataConfigServiceProxy
|
||||
.getProxy(serviceName);
|
||||
|
||||
if (dubboMetadataService == null) { // If not found, try to initialize
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info(
|
||||
"The metadata of Dubbo service[key : {}] can't be found when the subscribed service[name : {}], "
|
||||
+ "and then try to initialize it",
|
||||
url.getServiceKey(), serviceName);
|
||||
}
|
||||
repository.initializeMetadata(serviceName);
|
||||
dubboMetadataService = dubboMetadataConfigServiceProxy.getProxy(serviceName);
|
||||
}
|
||||
|
||||
if (dubboMetadataService == null) { // It makes sure not-found, return immediately
|
||||
if (logger.isWarnEnabled()) {
|
||||
logger.warn(
|
||||
@@ -293,6 +269,7 @@ public abstract class AbstractSpringCloudRegistry extends FailbackRegistry {
|
||||
}
|
||||
|
||||
List<URL> exportedURLs = getExportedURLs(dubboMetadataService, url);
|
||||
|
||||
for (URL exportedURL : exportedURLs) {
|
||||
String protocol = exportedURL.getProtocol();
|
||||
List<URL> subscribedURLs = new LinkedList<>();
|
||||
@@ -330,11 +307,7 @@ public abstract class AbstractSpringCloudRegistry extends FailbackRegistry {
|
||||
}
|
||||
|
||||
private List<URL> emptyURLs(URL url) {
|
||||
// issue : When the last service provider is closed, the client still periodically
|
||||
// connects to the last provider.n
|
||||
// fix https://github.com/alibaba/spring-cloud-alibaba/issues/1259
|
||||
return asList(from(url).setProtocol(EMPTY_PROTOCOL).removeParameter(CATEGORY_KEY)
|
||||
.build());
|
||||
return asList(from(url).setProtocol(EMPTY_PROTOCOL).build());
|
||||
}
|
||||
|
||||
private List<ServiceInstance> getServiceInstances(String serviceName) {
|
||||
@@ -355,7 +328,7 @@ public abstract class AbstractSpringCloudRegistry extends FailbackRegistry {
|
||||
}
|
||||
|
||||
private List<URL> getExportedURLs(DubboMetadataService dubboMetadataService,
|
||||
URL url) {
|
||||
URL url) {
|
||||
String serviceInterface = url.getServiceInterface();
|
||||
String group = url.getParameter(GROUP_KEY);
|
||||
String version = url.getParameter(VERSION_KEY);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user