mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
commit
6295537007
@ -24,7 +24,7 @@ jobs:
|
|||||||
- ~/.m2
|
- ~/.m2
|
||||||
- run:
|
- run:
|
||||||
name: "Running build"
|
name: "Running build"
|
||||||
command: ./mvnw -Pdocs clean install -U -nsu --batch-mode -Dmaven.test.redirectTestOutputToFile=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dgpg.skip
|
command: ./mvnw clean install -U -nsu --batch-mode -Dmaven.test.redirectTestOutputToFile=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dgpg.skip
|
||||||
- run:
|
- run:
|
||||||
name: "Aggregate test results"
|
name: "Aggregate test results"
|
||||||
when: always
|
when: always
|
||||||
|
8
.gitignore
vendored
8
.gitignore
vendored
@ -32,3 +32,11 @@ hs_err_pid*
|
|||||||
target
|
target
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
# temp ignore
|
||||||
|
*.cache
|
||||||
|
*.diff
|
||||||
|
*.patch
|
||||||
|
*.tmp
|
||||||
|
|
||||||
|
# Maven ignore
|
||||||
|
.flattened-pom.xml
|
||||||
|
@ -1 +0,0 @@
|
|||||||
-DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local -P spring
|
|
3
mvnw
vendored
3
mvnw
vendored
@ -227,7 +227,7 @@ export MAVEN_CMD_LINE_ARGS
|
|||||||
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
echo "Running version check"
|
echo "Running version check"
|
||||||
VERSION=$( sed '\!<parent!,\!</parent!d' `dirname $0`/pom.xml | grep '<version' | head -1 | sed -e 's/.*<version>//' -e 's!</version>.*$!!' )
|
VERSION=$( sed '\!<parent!,\!</parent!d' `dirname $0`/pom.xml | grep '<revision' | head -1 | sed -e 's/.*<revision>//' -e 's!</revision>.*$!!' )
|
||||||
echo "The found version is [${VERSION}]"
|
echo "The found version is [${VERSION}]"
|
||||||
|
|
||||||
if echo $VERSION | egrep -q 'M|RC'; then
|
if echo $VERSION | egrep -q 'M|RC'; then
|
||||||
@ -249,5 +249,6 @@ fi
|
|||||||
exec "$JAVACMD" \
|
exec "$JAVACMD" \
|
||||||
$MAVEN_OPTS \
|
$MAVEN_OPTS \
|
||||||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||||
|
"-Drevision=${VERSION}" \
|
||||||
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||||
${WRAPPER_LAUNCHER} ${MAVEN_ARGS} "$@"
|
${WRAPPER_LAUNCHER} ${MAVEN_ARGS} "$@"
|
166
pom.xml
166
pom.xml
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba</artifactId>
|
<artifactId>spring-cloud-alibaba</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Spring Cloud Alibaba</name>
|
<name>Spring Cloud Alibaba</name>
|
||||||
<description>Spring Cloud Alibaba</description>
|
<description>Spring Cloud Alibaba</description>
|
||||||
@ -69,9 +69,19 @@
|
|||||||
<name>yunzheng</name>
|
<name>yunzheng</name>
|
||||||
<email>yunzheng1228@gmail.com</email>
|
<email>yunzheng1228@gmail.com</email>
|
||||||
</developer>
|
</developer>
|
||||||
|
<developer>
|
||||||
|
<id>theonefx</id>
|
||||||
|
<name>theonefx</name>
|
||||||
|
<email>chenxilzx1@gmail.com</email>
|
||||||
|
<organization>Alibaba</organization>
|
||||||
|
<url>https://github.com/theonefx</url>
|
||||||
|
</developer>
|
||||||
</developers>
|
</developers>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
<!-- Project revision -->
|
||||||
|
<revision>2.2.1.RELEASE</revision>
|
||||||
|
|
||||||
<!-- Dependency Versions -->
|
<!-- Dependency Versions -->
|
||||||
<spring-cloud-commons.version>2.2.2.RELEASE</spring-cloud-commons.version>
|
<spring-cloud-commons.version>2.2.2.RELEASE</spring-cloud-commons.version>
|
||||||
<spring-cloud-netflix.version>2.2.2.RELEASE</spring-cloud-netflix.version>
|
<spring-cloud-netflix.version>2.2.2.RELEASE</spring-cloud-netflix.version>
|
||||||
@ -88,7 +98,7 @@
|
|||||||
<slf4j-api.version>1.7.25</slf4j-api.version>
|
<slf4j-api.version>1.7.25</slf4j-api.version>
|
||||||
|
|
||||||
<!-- Apache Dubbo -->
|
<!-- Apache Dubbo -->
|
||||||
<dubbo.version>2.7.4.1</dubbo.version>
|
<dubbo.version>2.7.6</dubbo.version>
|
||||||
<curator.version>4.0.1</curator.version>
|
<curator.version>4.0.1</curator.version>
|
||||||
|
|
||||||
<!-- Apache RocketMQ -->
|
<!-- Apache RocketMQ -->
|
||||||
@ -98,6 +108,10 @@
|
|||||||
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
|
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
|
||||||
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
|
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
|
||||||
<maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
|
<maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.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>
|
||||||
<gmavenplus-plugin.version>1.6</gmavenplus-plugin.version>
|
<gmavenplus-plugin.version>1.6</gmavenplus-plugin.version>
|
||||||
<jacoco.version>0.8.3</jacoco.version>
|
<jacoco.version>0.8.3</jacoco.version>
|
||||||
</properties>
|
</properties>
|
||||||
@ -304,7 +318,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- Checkstyle rules inherited from spring-cloud-build -->
|
<!-- Checkstyle rules inherited from spring-cloud-build -->
|
||||||
<suppressionsLocation>eclipse/checkstyle-suppressions.xml</suppressionsLocation>
|
<suppressionsLocation>${session.executionRootDirectory}/eclipse/checkstyle-suppressions.xml</suppressionsLocation>
|
||||||
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||||
<consoleOutput>true</consoleOutput>
|
<consoleOutput>true</consoleOutput>
|
||||||
<failsOnError>true</failsOnError>
|
<failsOnError>true</failsOnError>
|
||||||
@ -348,70 +362,92 @@
|
|||||||
</reporting>
|
</reporting>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>spring</id>
|
<id>release</id>
|
||||||
<repositories>
|
<build>
|
||||||
<repository>
|
<plugins>
|
||||||
<id>spring-snapshots</id>
|
<plugin>
|
||||||
<name>Spring Snapshots</name>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
<snapshots>
|
<version>${maven-source-plugin.version}</version>
|
||||||
<enabled>true</enabled>
|
<executions>
|
||||||
</snapshots>
|
<execution>
|
||||||
<releases>
|
<phase>package</phase>
|
||||||
<enabled>false</enabled>
|
<goals>
|
||||||
</releases>
|
<goal>jar-no-fork</goal>
|
||||||
</repository>
|
</goals>
|
||||||
<repository>
|
</execution>
|
||||||
<id>spring-milestones</id>
|
</executions>
|
||||||
<name>Spring Milestones</name>
|
</plugin>
|
||||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
<plugin>
|
||||||
<snapshots>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<enabled>false</enabled>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
</snapshots>
|
<version>${maven-javadoc-plugin.version}</version>
|
||||||
</repository>
|
<executions>
|
||||||
<repository>
|
<execution>
|
||||||
<id>spring-releases</id>
|
<phase>package</phase>
|
||||||
<name>Spring Releases</name>
|
<goals>
|
||||||
<url>https://repo.spring.io/release</url>
|
<goal>jar</goal>
|
||||||
<snapshots>
|
</goals>
|
||||||
<enabled>false</enabled>
|
</execution>
|
||||||
</snapshots>
|
</executions>
|
||||||
</repository>
|
</plugin>
|
||||||
</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>
|
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
|
<version>${maven-gpg-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>verify</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>sign</goal>
|
||||||
|
</goals>
|
||||||
|
</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>
|
||||||
|
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||||
|
</snapshotRepository>
|
||||||
|
<repository>
|
||||||
|
<id>sonatype-nexus-staging</id>
|
||||||
|
<name>Nexus Release Repository</name>
|
||||||
|
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba</artifactId>
|
<artifactId>spring-cloud-alibaba</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@ -19,66 +19,66 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-sentinel-datasource</artifactId>
|
<artifactId>spring-cloud-alibaba-sentinel-datasource</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-circuitbreaker-sentinel</artifactId>
|
<artifactId>spring-cloud-circuitbreaker-sentinel</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-seata</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-seata</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-config-server</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-nacos-config-server</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
|
<artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-bus-rocketmq</artifactId>
|
<artifactId>spring-cloud-starter-bus-rocketmq</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-sidecar</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-sidecar</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-dubbo</artifactId>
|
<artifactId>spring-cloud-starter-dubbo</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -12,27 +12,25 @@
|
|||||||
|
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Spring Cloud Alibaba Dependencies</name>
|
<name>Spring Cloud Alibaba Dependencies</name>
|
||||||
<description>Spring Cloud Alibaba Dependencies</description>
|
<description>Spring Cloud Alibaba Dependencies</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
<revision>2.2.1.RELEASE</revision>
|
||||||
<sentinel.version>1.7.1</sentinel.version>
|
<sentinel.version>1.7.1</sentinel.version>
|
||||||
<oss.version>3.1.0</oss.version>
|
<oss.version>3.1.0</oss.version>
|
||||||
<seata.version>1.1.0</seata.version>
|
<seata.version>1.1.0</seata.version>
|
||||||
<nacos.client.version>1.2.1</nacos.client.version>
|
<nacos.client.version>1.2.1</nacos.client.version>
|
||||||
<nacos.config.version>0.8.0</nacos.config.version>
|
<nacos.config.version>0.8.0</nacos.config.version>
|
||||||
<acm.version>1.0.9</acm.version>
|
<spring.context.support.version>1.0.6</spring.context.support.version>
|
||||||
<ans.version>1.0.1</ans.version>
|
|
||||||
<aliyun.sdk.version>4.4.1</aliyun.sdk.version>
|
<!-- Maven Plugin Versions -->
|
||||||
<alicloud.context.version>1.0.5</alicloud.context.version>
|
<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
|
||||||
<aliyun.sdk.edas.version>2.44.0</aliyun.sdk.edas.version>
|
<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
|
||||||
<schedulerX.client.version>2.1.6</schedulerX.client.version>
|
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
|
||||||
<aliyun.java.sdk.dysmsapi>1.1.0</aliyun.java.sdk.dysmsapi>
|
<flatten-maven-plugin.version>1.1.0</flatten-maven-plugin.version>
|
||||||
<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.5</spring.context.support.version>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
@ -93,6 +91,12 @@
|
|||||||
<version>${sentinel.version}</version>
|
<version>${sentinel.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.csp</groupId>
|
||||||
|
<artifactId>sentinel-datasource-consul</artifactId>
|
||||||
|
<version>${sentinel.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.csp</groupId>
|
<groupId>com.alibaba.csp</groupId>
|
||||||
<artifactId>sentinel-web-servlet</artifactId>
|
<artifactId>sentinel-web-servlet</artifactId>
|
||||||
@ -180,73 +184,73 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-sentinel-datasource</artifactId>
|
<artifactId>spring-cloud-alibaba-sentinel-datasource</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-sentinel-gateway</artifactId>
|
<artifactId>spring-cloud-alibaba-sentinel-gateway</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Own dependencies - Starters -->
|
<!-- Own dependencies - Starters -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-circuitbreaker-sentinel</artifactId>
|
<artifactId>spring-cloud-circuitbreaker-sentinel</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-seata</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-seata</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-config-server</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-nacos-config-server</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
|
<artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-bus-rocketmq</artifactId>
|
<artifactId>spring-cloud-starter-bus-rocketmq</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-sidecar</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-sidecar</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Dubbo -->
|
<!-- Dubbo -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-dubbo</artifactId>
|
<artifactId>spring-cloud-starter-dubbo</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -261,67 +265,91 @@
|
|||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>spring</id>
|
<id>release</id>
|
||||||
<repositories>
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>${maven-source-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>jar-no-fork</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>${maven-javadoc-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
|
<version>${maven-gpg-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>verify</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>sign</goal>
|
||||||
|
</goals>
|
||||||
|
</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>
|
||||||
|
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||||
|
</snapshotRepository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>spring-snapshots</id>
|
<id>sonatype-nexus-staging</id>
|
||||||
<name>Spring Snapshots</name>
|
<name>Nexus Release Repository</name>
|
||||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</snapshots>
|
|
||||||
<releases>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</releases>
|
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
</distributionManagement>
|
||||||
<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>
|
||||||
|
|
||||||
</profiles>
|
</profiles>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba</artifactId>
|
<artifactId>spring-cloud-alibaba</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -5,15 +5,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>nacos-config-example</artifactId>
|
<artifactId>nacos-config-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Nacos Config Example</name>
|
||||||
<description>Example demonstrating how to use nacos config</description>
|
<description>Example demonstrating how to use nacos config</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>nacos-discovery-example</artifactId>
|
<artifactId>nacos-discovery-example</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>nacos-discovery-consumer-example</artifactId>
|
<artifactId>nacos-discovery-consumer-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Nacos Discovery Consumer Example</name>
|
||||||
<description>Example demonstrating how to use nacos discovery</description>
|
<description>Example demonstrating how to use nacos discovery</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>nacos-discovery-example</artifactId>
|
<artifactId>nacos-discovery-example</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>nacos-discovery-consumer-sclb-example</artifactId>
|
<artifactId>nacos-discovery-consumer-sclb-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Nacos Discovery x Load Balancer Example</name>
|
||||||
<description>Example demonstrating how to use nacos discovery</description>
|
<description>Example demonstrating how to use nacos discovery</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>nacos-discovery-example</artifactId>
|
<artifactId>nacos-discovery-example</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>nacos-discovery-provider-example</artifactId>
|
<artifactId>nacos-discovery-provider-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Nacos Discovery Provider Example</name>
|
||||||
<description>Example demonstrating how to use nacos discovery</description>
|
<description>Example demonstrating how to use nacos discovery</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>nacos-discovery-example</artifactId>
|
<artifactId>nacos-discovery-example</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>nacos-discovery-spring-cloud-config-client-example</artifactId>
|
<artifactId>nacos-discovery-spring-cloud-config-client-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Nacos Discovery x Config Client Example</name>
|
||||||
<description>Example demonstrating how to use nacos discovery</description>
|
<description>Example demonstrating how to use nacos discovery</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>nacos-discovery-example</artifactId>
|
<artifactId>nacos-discovery-example</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>nacos-discovery-spring-cloud-config-server-example</artifactId>
|
<artifactId>nacos-discovery-spring-cloud-config-server-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Nacos Discovery x Config Server Example</name>
|
||||||
<description>Example demonstrating how to use nacos discovery</description>
|
<description>Example demonstrating how to use nacos discovery</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>nacos-discovery-example</artifactId>
|
<artifactId>nacos-discovery-example</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>nacos-reactivediscovery-consumer-example</artifactId>
|
<artifactId>nacos-reactivediscovery-consumer-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Nacos Discovery Reactive Example</name>
|
||||||
<description>Example demonstrating how to use nacos discovery</description>
|
<description>Example demonstrating how to use nacos discovery</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,15 +5,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>nacos-discovery-example</artifactId>
|
<artifactId>nacos-discovery-example</artifactId>
|
||||||
<packaging>pom</packaging>
|
<name>Spring Cloud Starter Alibaba Nacos Discovery Examples</name>
|
||||||
<description>Example demonstrating how to use nacos discovery</description>
|
<description>Example demonstrating how to use nacos discovery</description>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>nacos-gateway-example</artifactId>
|
<artifactId>nacos-gateway-example</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>nacos-gateway-discovery-example</artifactId>
|
<artifactId>nacos-gateway-discovery-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Nacos Discovery x Gateway Example</name>
|
||||||
<description>Example demonstrating how to use gateway with nacos</description>
|
<description>Example demonstrating how to use gateway with nacos</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>nacos-gateway-example</artifactId>
|
<artifactId>nacos-gateway-example</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>nacos-gateway-provider-example</artifactId>
|
<artifactId>nacos-gateway-provider-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Nacos Discovery x Gateway - Provider Example</name>
|
||||||
<description>Example demonstrating how to use gateway with nacos</description>
|
<description>Example demonstrating how to use gateway with nacos</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,15 +5,16 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>nacos-gateway-example</artifactId>
|
<artifactId>nacos-gateway-example</artifactId>
|
||||||
<packaging>pom</packaging>
|
<name>Spring Cloud Starter Alibaba Nacos Discovery x Gateway Examples</name>
|
||||||
<description>Example demonstrating how to use gateway with nacos</description>
|
<description>Example demonstrating how to use gateway with nacos</description>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba</artifactId>
|
<artifactId>spring-cloud-alibaba</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -5,15 +5,16 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>rocketmq-consume-example</artifactId>
|
<artifactId>rocketmq-consume-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Stream Alibaba RocketMQ Consume Example</name>
|
||||||
<description>Example demonstrating how to use rocketmq consume</description>
|
<description>Example demonstrating how to use rocketmq consume</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,15 +5,16 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>rocketmq-produce-example</artifactId>
|
<artifactId>rocketmq-produce-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Stream Alibaba RocketMQ Produce Example</name>
|
||||||
<description>Example demonstrating how to use rocketmq produce</description>
|
<description>Example demonstrating how to use rocketmq produce</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,11 +5,14 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>account-service</artifactId>
|
<artifactId>account-service</artifactId>
|
||||||
|
<name>Spring Cloud Starter Alibaba Seata Example - Account Service</name>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -5,11 +5,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>business-service</artifactId>
|
<artifactId>business-service</artifactId>
|
||||||
|
<name>Spring Cloud Starter Alibaba Seata Example - Business Service</name>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -5,11 +5,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>order-service</artifactId>
|
<artifactId>order-service</artifactId>
|
||||||
|
<name>Spring Cloud Starter Alibaba Seata Example - Business Service</name>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -5,11 +5,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>storage-service</artifactId>
|
<artifactId>storage-service</artifactId>
|
||||||
|
<name>Spring Cloud Starter Alibaba Seata Example - Storage Service</name>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -5,15 +5,16 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>sentinel-core-example</artifactId>
|
<artifactId>sentinel-core-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Sentinel Core Example</name>
|
||||||
<description>Example demonstrating how to use sentinel</description>
|
<description>Example demonstrating how to use sentinel</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>sentinel-dubbo-api</artifactId>
|
<artifactId>sentinel-dubbo-api</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Sentinel x Dubbo - API</name>
|
||||||
<description>api for sentinel dubbo example</description>
|
<description>api for sentinel dubbo example</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
@ -5,15 +5,16 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>sentinel-dubbo-consumer-example</artifactId>
|
<artifactId>sentinel-dubbo-consumer-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Sentinel x Dubbo - Consumer Example</name>
|
||||||
<description>Example demonstrating how to use sentinel with dubbo</description>
|
<description>Example demonstrating how to use sentinel with dubbo</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,15 +5,16 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>sentinel-dubbo-provider-example</artifactId>
|
<artifactId>sentinel-dubbo-provider-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Sentinel x Dubbo - Provider Example</name>
|
||||||
<description>Example demonstrating how to use sentinel with dubbo</description>
|
<description>Example demonstrating how to use sentinel with dubbo</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,15 +5,16 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>sentinel-feign-consumer-example</artifactId>
|
<artifactId>sentinel-feign-consumer-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Sentinel x Feign - Consumer Example</name>
|
||||||
<description>Example demonstrating how to use sentinel with feign</description>
|
<description>Example demonstrating how to use sentinel with feign</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,15 +5,16 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>sentinel-feign-provider-example</artifactId>
|
<artifactId>sentinel-feign-provider-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Sentinel x Feign - Provider Example</name>
|
||||||
<description>Example demonstrating how to use sentinel with feign</description>
|
<description>Example demonstrating how to use sentinel with feign</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,15 +5,16 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>sentinel-spring-cloud-gateway-example</artifactId>
|
<artifactId>sentinel-spring-cloud-gateway-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Sentinel x Gateway Example</name>
|
||||||
<description>Example demonstrating how to use sentinel with spring cloud gateway</description>
|
<description>Example demonstrating how to use sentinel with spring cloud gateway</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,15 +5,16 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>sentinel-webflux-example</artifactId>
|
<artifactId>sentinel-webflux-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Sentinel x WebFlux Example</name>
|
||||||
<description>Example demonstrating how to use sentinel with webflux</description>
|
<description>Example demonstrating how to use sentinel with webflux</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -5,15 +5,16 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
||||||
<artifactId>sentinel-zuul-example</artifactId>
|
<artifactId>sentinel-zuul-example</artifactId>
|
||||||
<packaging>jar</packaging>
|
<name>Spring Cloud Starter Alibaba Sentinel x Zuul Example</name>
|
||||||
<description>Example demonstrating how to use sentinel with zuul</description>
|
<description>Example demonstrating how to use sentinel with zuul</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -345,4 +345,4 @@ HTTP 响应为:
|
|||||||
- [spring-cloud-dubbo-provider-web-sample](spring-cloud-dubbo-provider-web-sample):Dubbo Spring Cloud 服务提供方示例(Web 应用)
|
- [spring-cloud-dubbo-provider-web-sample](spring-cloud-dubbo-provider-web-sample):Dubbo Spring Cloud 服务提供方示例(Web 应用)
|
||||||
- [spring-cloud-dubbo-provider-sample](spring-cloud-dubbo-provider-sample):Dubbo Spring Cloud 服务提供方示例(非 Web 应用)
|
- [spring-cloud-dubbo-provider-sample](spring-cloud-dubbo-provider-sample):Dubbo Spring Cloud 服务提供方示例(非 Web 应用)
|
||||||
- [spring-cloud-dubbo-consumer-sample](spring-cloud-dubbo-consumer-sample):Dubbo Spring Cloud 服务消费方示例
|
- [spring-cloud-dubbo-consumer-sample](spring-cloud-dubbo-consumer-sample):Dubbo Spring Cloud 服务消费方示例
|
||||||
- [spring-cloud-dubbo-servlet-gateway](spring-cloud-dubbo-servlet-gateway)-sample:Dubbo Spring Cloud Servlet 网关简易实现示例
|
- [spring-cloud-dubbo-servlet-gateway](spring-cloud-dubbo-servlet-gateway-sample):Dubbo Spring Cloud Servlet 网关简易实现示例
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<name>Spring Cloud Alibaba Dubbo Examples</name>
|
<name>Spring Cloud Alibaba Dubbo Examples</name>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
@ -13,7 +13,6 @@
|
|||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-dubbo-client-sample</artifactId>
|
<artifactId>spring-cloud-dubbo-client-sample</artifactId>
|
||||||
<name>Spring Cloud Dubbo Client Sample</name>
|
<name>Spring Cloud Dubbo Client Sample</name>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- Sample API -->
|
<!-- Sample API -->
|
||||||
|
@ -11,5 +11,7 @@ spring:
|
|||||||
allow-bean-definition-overriding: true
|
allow-bean-definition-overriding: true
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
|
username: nacos
|
||||||
|
password: nacos
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 127.0.0.1:8848
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -8,6 +8,8 @@ spring:
|
|||||||
# default disable all
|
# default disable all
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
|
username: nacos
|
||||||
|
password: nacos
|
||||||
discovery:
|
discovery:
|
||||||
enabled: false
|
enabled: false
|
||||||
register-enabled: false
|
register-enabled: false
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -27,6 +27,8 @@ spring:
|
|||||||
|
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
|
username: nacos
|
||||||
|
password: nacos
|
||||||
discovery:
|
discovery:
|
||||||
enabled: true
|
enabled: true
|
||||||
register-enabled: true
|
register-enabled: true
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -8,6 +8,8 @@ spring:
|
|||||||
# default disable all
|
# default disable all
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
|
username: nacos
|
||||||
|
password: nacos
|
||||||
discovery:
|
discovery:
|
||||||
enabled: false
|
enabled: false
|
||||||
register-enabled: false
|
register-enabled: false
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@ -14,7 +14,7 @@
|
|||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-dubbo-server-sample</artifactId>
|
<artifactId>spring-cloud-dubbo-server-sample</artifactId>
|
||||||
<name>Spring Cloud Dubbo Server Sample</name>
|
<name>Spring Cloud Dubbo Server Sample</name>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-dubbo-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -4,13 +4,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>spring-cloud-alibaba-sidecar-consul-example</artifactId>
|
<artifactId>spring-cloud-alibaba-sidecar-consul-example</artifactId>
|
||||||
|
<name>Spring Cloud Starter Alibaba Sidecar x Consul Example</name>
|
||||||
<description>Example demonstrating how to use Spring Cloud Alibaba Sidecar with consul</description>
|
<description>Example demonstrating how to use Spring Cloud Alibaba Sidecar with consul</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -4,13 +4,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>spring-cloud-alibaba-sidecar-nacos-example</artifactId>
|
<artifactId>spring-cloud-alibaba-sidecar-nacos-example</artifactId>
|
||||||
|
<name>Spring Cloud Starter Alibaba Sidecar x Nacos Example</name>
|
||||||
<description>Example demonstrating how to use Spring Cloud Alibaba Sidecar with nacos</description>
|
<description>Example demonstrating how to use Spring Cloud Alibaba Sidecar with nacos</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@ server:
|
|||||||
spring:
|
spring:
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
|
username: nacos
|
||||||
|
password: nacos
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: localhost:8848
|
server-addr: localhost:8848
|
||||||
gateway:
|
gateway:
|
||||||
@ -17,7 +19,7 @@ sidecar:
|
|||||||
# 异构微服务的端口
|
# 异构微服务的端口
|
||||||
port: 8060
|
port: 8060
|
||||||
# 异构微服务的健康检查URL
|
# 异构微服务的健康检查URL
|
||||||
health-check-url: http://localhost:8060/health.json
|
#health-check-url: http://localhost:8060/health.json
|
||||||
management:
|
management:
|
||||||
endpoint:
|
endpoint:
|
||||||
health:
|
health:
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>spring-cloud-bus-rocketmq-example</artifactId>
|
<artifactId>spring-cloud-bus-rocketmq-example</artifactId>
|
||||||
<name>Spring Cloud Bus RocketMQ Example</name>
|
<name>Spring Cloud Starter Bus Alibaba RocketMQ Example</name>
|
||||||
|
<description>Example demonstrating how to use Spring Cloud Bus RocketMQ</description>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba</artifactId>
|
<artifactId>spring-cloud-alibaba</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@ -83,6 +83,12 @@
|
|||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.csp</groupId>
|
||||||
|
<artifactId>sentinel-datasource-consul</artifactId>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>jackson-databind</artifactId>
|
<artifactId>jackson-databind</artifactId>
|
||||||
|
@ -0,0 +1,98 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2013-2018 the original author or authors.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* https://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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.alibaba.cloud.sentinel.datasource.config;
|
||||||
|
|
||||||
|
import com.alibaba.cloud.sentinel.datasource.factorybean.ConsulDataSourceFactoryBean;
|
||||||
|
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Consul Properties class Using by {@link DataSourcePropertiesConfiguration} and
|
||||||
|
* {@link ConsulDataSourceFactoryBean}.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:mengjindc@gmail.com">mengjin</a>
|
||||||
|
*/
|
||||||
|
public class ConsulDataSourceProperties extends AbstractDataSourceProperties {
|
||||||
|
|
||||||
|
public ConsulDataSourceProperties(){
|
||||||
|
super(ConsulDataSourceFactoryBean.class.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* consul server host.
|
||||||
|
*/
|
||||||
|
private String host;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* consul server port.
|
||||||
|
*/
|
||||||
|
private int port=8500;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* data key in Redis.
|
||||||
|
*/
|
||||||
|
private String ruleKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request of query will hang until timeout (in second) or get updated value.
|
||||||
|
*/
|
||||||
|
private int waitTimeoutInSecond = 1;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void preCheck(String dataSourceName) {
|
||||||
|
if(StringUtils.isEmpty(host)){
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"ConsulDataSource server-host is empty");
|
||||||
|
}
|
||||||
|
if(StringUtils.isEmpty(ruleKey)){
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"ConsulDataSource ruleKey can not be empty");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHost() {
|
||||||
|
return host;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHost(String host) {
|
||||||
|
this.host = host;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPort() {
|
||||||
|
return port;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPort(int port) {
|
||||||
|
this.port = port;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRuleKey() {
|
||||||
|
return ruleKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRuleKey(String ruleKey) {
|
||||||
|
this.ruleKey = ruleKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getWaitTimeoutInSecond() {
|
||||||
|
return waitTimeoutInSecond;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWaitTimeoutInSecond(int waitTimeoutInSecond) {
|
||||||
|
this.waitTimeoutInSecond = waitTimeoutInSecond;
|
||||||
|
}
|
||||||
|
}
|
@ -34,6 +34,7 @@ import org.springframework.util.ObjectUtils;
|
|||||||
* @see ZookeeperDataSourceProperties
|
* @see ZookeeperDataSourceProperties
|
||||||
* @see FileDataSourceProperties
|
* @see FileDataSourceProperties
|
||||||
* @see RedisDataSourceProperties
|
* @see RedisDataSourceProperties
|
||||||
|
* @see ConsulDataSourceProperties
|
||||||
*/
|
*/
|
||||||
public class DataSourcePropertiesConfiguration {
|
public class DataSourcePropertiesConfiguration {
|
||||||
|
|
||||||
@ -47,9 +48,23 @@ public class DataSourcePropertiesConfiguration {
|
|||||||
|
|
||||||
private RedisDataSourceProperties redis;
|
private RedisDataSourceProperties redis;
|
||||||
|
|
||||||
|
private ConsulDataSourceProperties consul;
|
||||||
|
|
||||||
public DataSourcePropertiesConfiguration() {
|
public DataSourcePropertiesConfiguration() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DataSourcePropertiesConfiguration(ConsulDataSourceProperties consul) {
|
||||||
|
this.consul = consul;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConsulDataSourceProperties getConsul() {
|
||||||
|
return consul;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConsul(ConsulDataSourceProperties consul) {
|
||||||
|
this.consul = consul;
|
||||||
|
}
|
||||||
|
|
||||||
public DataSourcePropertiesConfiguration(FileDataSourceProperties file) {
|
public DataSourcePropertiesConfiguration(FileDataSourceProperties file) {
|
||||||
this.file = file;
|
this.file = file;
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ import com.alibaba.cloud.sentinel.datasource.factorybean.RedisDataSourceFactoryB
|
|||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Zookeeper Properties class Using by {@link DataSourcePropertiesConfiguration} and
|
* Redis Properties class Using by {@link DataSourcePropertiesConfiguration} and
|
||||||
* {@link RedisDataSourceFactoryBean}.
|
* {@link RedisDataSourceFactoryBean}.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:wangiegie@gmail.com">lengleng</a>
|
* @author <a href="mailto:wangiegie@gmail.com">lengleng</a>
|
||||||
|
@ -0,0 +1,96 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2013-2018 the original author or authors.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* https://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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.alibaba.cloud.sentinel.datasource.factorybean;
|
||||||
|
|
||||||
|
import com.alibaba.csp.sentinel.datasource.Converter;
|
||||||
|
import com.alibaba.csp.sentinel.datasource.consul.ConsulDataSource;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.FactoryBean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A {@link FactoryBean} for creating {@link ConsulDataSource} instance.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:mengjindc@gmail.com">mengjin</a>
|
||||||
|
* @see ConsulDataSource
|
||||||
|
*/
|
||||||
|
public class ConsulDataSourceFactoryBean implements FactoryBean<ConsulDataSource> {
|
||||||
|
|
||||||
|
private String host;
|
||||||
|
|
||||||
|
private int port;
|
||||||
|
|
||||||
|
private String ruleKey;
|
||||||
|
|
||||||
|
private int waitTimeoutInSecond;
|
||||||
|
|
||||||
|
private Converter converter;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConsulDataSource getObject() throws Exception {
|
||||||
|
return new ConsulDataSource(
|
||||||
|
host,
|
||||||
|
port,
|
||||||
|
ruleKey,
|
||||||
|
waitTimeoutInSecond,
|
||||||
|
converter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<?> getObjectType() {
|
||||||
|
return ConsulDataSource.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHost() {
|
||||||
|
return host;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHost(String host) {
|
||||||
|
this.host = host;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPort() {
|
||||||
|
return port;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPort(int port) {
|
||||||
|
this.port = port;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRuleKey() {
|
||||||
|
return ruleKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRuleKey(String ruleKey) {
|
||||||
|
this.ruleKey = ruleKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getWaitTimeoutInSecond() {
|
||||||
|
return waitTimeoutInSecond;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWaitTimeoutInSecond(int waitTimeoutInSecond) {
|
||||||
|
this.waitTimeoutInSecond = waitTimeoutInSecond;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Converter getConverter() {
|
||||||
|
return converter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConverter(Converter converter) {
|
||||||
|
this.converter = converter;
|
||||||
|
}
|
||||||
|
}
|
@ -3,3 +3,4 @@ file =com.alibaba.csp.sentinel.datasource.FileRefreshableDataSource
|
|||||||
apollo = com.alibaba.csp.sentinel.datasource.apollo.ApolloDataSource
|
apollo = com.alibaba.csp.sentinel.datasource.apollo.ApolloDataSource
|
||||||
zk = com.alibaba.csp.sentinel.datasource.zookeeper.ZookeeperDataSource
|
zk = com.alibaba.csp.sentinel.datasource.zookeeper.ZookeeperDataSource
|
||||||
redis = com.alibaba.csp.sentinel.datasource.redis.RedisDataSource
|
redis = com.alibaba.csp.sentinel.datasource.redis.RedisDataSource
|
||||||
|
consul = com.alibaba.csp.sentinel.datasource.consul.ConsulDataSource
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -16,23 +16,93 @@
|
|||||||
|
|
||||||
package com.alibaba.cloud.seata.feign.hystrix;
|
package com.alibaba.cloud.seata.feign.hystrix;
|
||||||
|
|
||||||
|
import java.util.concurrent.BlockingQueue;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
import java.util.concurrent.ThreadPoolExecutor;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import com.netflix.hystrix.HystrixThreadPoolKey;
|
||||||
|
import com.netflix.hystrix.HystrixThreadPoolProperties;
|
||||||
import com.netflix.hystrix.strategy.HystrixPlugins;
|
import com.netflix.hystrix.strategy.HystrixPlugins;
|
||||||
import com.netflix.hystrix.strategy.concurrency.HystrixConcurrencyStrategy;
|
import com.netflix.hystrix.strategy.concurrency.HystrixConcurrencyStrategy;
|
||||||
|
import com.netflix.hystrix.strategy.concurrency.HystrixRequestVariable;
|
||||||
|
import com.netflix.hystrix.strategy.concurrency.HystrixRequestVariableLifecycle;
|
||||||
|
import com.netflix.hystrix.strategy.eventnotifier.HystrixEventNotifier;
|
||||||
|
import com.netflix.hystrix.strategy.executionhook.HystrixCommandExecutionHook;
|
||||||
|
import com.netflix.hystrix.strategy.metrics.HystrixMetricsPublisher;
|
||||||
|
import com.netflix.hystrix.strategy.properties.HystrixPropertiesStrategy;
|
||||||
|
import com.netflix.hystrix.strategy.properties.HystrixProperty;
|
||||||
import io.seata.core.context.RootContext;
|
import io.seata.core.context.RootContext;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import org.springframework.web.context.request.RequestAttributes;
|
||||||
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author xiaojing
|
* @author xiaojing
|
||||||
*/
|
*/
|
||||||
public class SeataHystrixConcurrencyStrategy extends HystrixConcurrencyStrategy {
|
public class SeataHystrixConcurrencyStrategy extends HystrixConcurrencyStrategy {
|
||||||
|
|
||||||
|
private final Logger logger = LoggerFactory.getLogger(SeataHystrixConcurrencyStrategy.class);
|
||||||
private HystrixConcurrencyStrategy delegate;
|
private HystrixConcurrencyStrategy delegate;
|
||||||
|
|
||||||
public SeataHystrixConcurrencyStrategy() {
|
public SeataHystrixConcurrencyStrategy() {
|
||||||
|
try {
|
||||||
this.delegate = HystrixPlugins.getInstance().getConcurrencyStrategy();
|
this.delegate = HystrixPlugins.getInstance().getConcurrencyStrategy();
|
||||||
|
if (this.delegate instanceof SeataHystrixConcurrencyStrategy) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
HystrixCommandExecutionHook commandExecutionHook = HystrixPlugins.getInstance().getCommandExecutionHook();
|
||||||
|
HystrixEventNotifier eventNotifier = HystrixPlugins.getInstance().getEventNotifier();
|
||||||
|
HystrixMetricsPublisher metricsPublisher = HystrixPlugins.getInstance().getMetricsPublisher();
|
||||||
|
HystrixPropertiesStrategy propertiesStrategy = HystrixPlugins.getInstance().getPropertiesStrategy();
|
||||||
|
logCurrentStateOfHystrixPlugins(eventNotifier, metricsPublisher, propertiesStrategy);
|
||||||
HystrixPlugins.reset();
|
HystrixPlugins.reset();
|
||||||
HystrixPlugins.getInstance().registerConcurrencyStrategy(this);
|
HystrixPlugins.getInstance().registerConcurrencyStrategy(this);
|
||||||
|
HystrixPlugins.getInstance().registerCommandExecutionHook(commandExecutionHook);
|
||||||
|
HystrixPlugins.getInstance().registerEventNotifier(eventNotifier);
|
||||||
|
HystrixPlugins.getInstance().registerMetricsPublisher(metricsPublisher);
|
||||||
|
HystrixPlugins.getInstance().registerPropertiesStrategy(propertiesStrategy);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
logger.error("Failed to register Seata Hystrix Concurrency Strategy", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void logCurrentStateOfHystrixPlugins(HystrixEventNotifier eventNotifier,
|
||||||
|
HystrixMetricsPublisher metricsPublisher,
|
||||||
|
HystrixPropertiesStrategy propertiesStrategy) {
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("Current Hystrix plugins configuration is [" + "concurrencyStrategy [" + this.delegate + "],"
|
||||||
|
+ "eventNotifier [" + eventNotifier + "]," + "metricPublisher [" + metricsPublisher + "],"
|
||||||
|
+ "propertiesStrategy [" + propertiesStrategy + "]," + "]");
|
||||||
|
logger.debug("Registering Seata Hystrix Concurrency Strategy.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ThreadPoolExecutor getThreadPool(HystrixThreadPoolKey threadPoolKey, HystrixProperty<Integer> corePoolSize,
|
||||||
|
HystrixProperty<Integer> maximumPoolSize,
|
||||||
|
HystrixProperty<Integer> keepAliveTime, TimeUnit unit,
|
||||||
|
BlockingQueue<Runnable> workQueue) {
|
||||||
|
return this.delegate.getThreadPool(threadPoolKey, corePoolSize, maximumPoolSize, keepAliveTime, unit,
|
||||||
|
workQueue);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ThreadPoolExecutor getThreadPool(HystrixThreadPoolKey threadPoolKey,
|
||||||
|
HystrixThreadPoolProperties threadPoolProperties) {
|
||||||
|
return this.delegate.getThreadPool(threadPoolKey, threadPoolProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockingQueue<Runnable> getBlockingQueue(int maxQueueSize) {
|
||||||
|
return this.delegate.getBlockingQueue(maxQueueSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> HystrixRequestVariable<T> getRequestVariable(HystrixRequestVariableLifecycle<T> rv) {
|
||||||
|
return this.delegate.getRequestVariable(rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -44,15 +114,14 @@ public class SeataHystrixConcurrencyStrategy extends HystrixConcurrencyStrategy
|
|||||||
Callable<K> wrappedCallable;
|
Callable<K> wrappedCallable;
|
||||||
if (this.delegate != null) {
|
if (this.delegate != null) {
|
||||||
wrappedCallable = this.delegate.wrapCallable(c);
|
wrappedCallable = this.delegate.wrapCallable(c);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
wrappedCallable = c;
|
wrappedCallable = c;
|
||||||
}
|
}
|
||||||
if (wrappedCallable instanceof SeataContextCallable) {
|
if (wrappedCallable instanceof SeataContextCallable) {
|
||||||
return wrappedCallable;
|
return wrappedCallable;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new SeataContextCallable<>(wrappedCallable);
|
return new SeataContextCallable<>(wrappedCallable, RequestContextHolder.getRequestAttributes());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class SeataContextCallable<K> implements Callable<K> {
|
private static class SeataContextCallable<K> implements Callable<K> {
|
||||||
@ -61,19 +130,23 @@ public class SeataHystrixConcurrencyStrategy extends HystrixConcurrencyStrategy
|
|||||||
|
|
||||||
private final String xid;
|
private final String xid;
|
||||||
|
|
||||||
SeataContextCallable(Callable<K> actual) {
|
private final RequestAttributes requestAttributes;
|
||||||
|
|
||||||
|
SeataContextCallable(Callable<K> actual, RequestAttributes requestAttribute) {
|
||||||
this.actual = actual;
|
this.actual = actual;
|
||||||
|
this.requestAttributes = requestAttribute;
|
||||||
this.xid = RootContext.getXID();
|
this.xid = RootContext.getXID();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public K call() throws Exception {
|
public K call() throws Exception {
|
||||||
try {
|
try {
|
||||||
|
RequestContextHolder.setRequestAttributes(requestAttributes);
|
||||||
RootContext.bind(xid);
|
RootContext.bind(xid);
|
||||||
return actual.call();
|
return actual.call();
|
||||||
}
|
} finally {
|
||||||
finally {
|
|
||||||
RootContext.unbind();
|
RootContext.unbind();
|
||||||
|
RequestContextHolder.resetRequestAttributes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -17,13 +17,11 @@
|
|||||||
package com.alibaba.cloud.sidecar.nacos;
|
package com.alibaba.cloud.sidecar.nacos;
|
||||||
|
|
||||||
import com.alibaba.cloud.nacos.NacosDiscoveryProperties;
|
import com.alibaba.cloud.nacos.NacosDiscoveryProperties;
|
||||||
import com.alibaba.cloud.nacos.discovery.NacosDiscoveryAutoConfiguration;
|
|
||||||
import com.alibaba.cloud.sidecar.SidecarAutoConfiguration;
|
import com.alibaba.cloud.sidecar.SidecarAutoConfiguration;
|
||||||
import com.alibaba.cloud.sidecar.SidecarDiscoveryClient;
|
import com.alibaba.cloud.sidecar.SidecarDiscoveryClient;
|
||||||
import com.alibaba.cloud.sidecar.SidecarProperties;
|
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@ -32,23 +30,15 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
* @author www.itmuch.com
|
* @author www.itmuch.com
|
||||||
*/
|
*/
|
||||||
@Configuration(proxyBeanMethods = false)
|
@Configuration(proxyBeanMethods = false)
|
||||||
@AutoConfigureBefore({ NacosDiscoveryAutoConfiguration.class,
|
@AutoConfigureBefore(SidecarAutoConfiguration.class)
|
||||||
SidecarAutoConfiguration.class })
|
@ConditionalOnBean(NacosDiscoveryProperties.class)
|
||||||
@ConditionalOnClass(NacosDiscoveryProperties.class)
|
|
||||||
public class SidecarNacosAutoConfiguration {
|
public class SidecarNacosAutoConfiguration {
|
||||||
|
|
||||||
@Bean
|
|
||||||
@ConditionalOnMissingBean
|
|
||||||
public SidecarNacosDiscoveryProperties sidecarNacosDiscoveryProperties(
|
|
||||||
SidecarProperties sidecarProperties) {
|
|
||||||
return new SidecarNacosDiscoveryProperties(sidecarProperties);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean
|
@ConditionalOnMissingBean
|
||||||
public SidecarDiscoveryClient sidecarDiscoveryClient(
|
public SidecarDiscoveryClient sidecarDiscoveryClient(
|
||||||
SidecarNacosDiscoveryProperties sidecarNacosDiscoveryProperties) {
|
NacosDiscoveryProperties nacosDiscoveryProperties) {
|
||||||
return new SidecarNacosDiscoveryClient(sidecarNacosDiscoveryProperties);
|
return new SidecarNacosDiscoveryClient(nacosDiscoveryProperties);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package com.alibaba.cloud.sidecar.nacos;
|
package com.alibaba.cloud.sidecar.nacos;
|
||||||
|
|
||||||
|
import com.alibaba.cloud.nacos.NacosDiscoveryProperties;
|
||||||
import com.alibaba.cloud.sidecar.SidecarDiscoveryClient;
|
import com.alibaba.cloud.sidecar.SidecarDiscoveryClient;
|
||||||
import com.alibaba.nacos.api.exception.NacosException;
|
import com.alibaba.nacos.api.exception.NacosException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -29,18 +30,18 @@ public class SidecarNacosDiscoveryClient implements SidecarDiscoveryClient {
|
|||||||
private static final Logger log = LoggerFactory
|
private static final Logger log = LoggerFactory
|
||||||
.getLogger(SidecarNacosDiscoveryClient.class);
|
.getLogger(SidecarNacosDiscoveryClient.class);
|
||||||
|
|
||||||
private final SidecarNacosDiscoveryProperties sidecarNacosDiscoveryProperties;
|
private final NacosDiscoveryProperties nacosDiscoveryProperties;
|
||||||
|
|
||||||
public SidecarNacosDiscoveryClient(
|
public SidecarNacosDiscoveryClient(
|
||||||
SidecarNacosDiscoveryProperties sidecarNacosDiscoveryProperties) {
|
NacosDiscoveryProperties nacosDiscoveryProperties) {
|
||||||
this.sidecarNacosDiscoveryProperties = sidecarNacosDiscoveryProperties;
|
this.nacosDiscoveryProperties = nacosDiscoveryProperties;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerInstance(String applicationName, String ip, Integer port) {
|
public void registerInstance(String applicationName, String ip, Integer port) {
|
||||||
try {
|
try {
|
||||||
this.sidecarNacosDiscoveryProperties.namingServiceInstance()
|
this.nacosDiscoveryProperties.namingServiceInstance().registerInstance(
|
||||||
.registerInstance(applicationName, ip, port);
|
applicationName, nacosDiscoveryProperties.getGroup(), ip, port);
|
||||||
}
|
}
|
||||||
catch (NacosException e) {
|
catch (NacosException e) {
|
||||||
log.warn("nacos exception happens", e);
|
log.warn("nacos exception happens", e);
|
||||||
@ -50,8 +51,8 @@ public class SidecarNacosDiscoveryClient implements SidecarDiscoveryClient {
|
|||||||
@Override
|
@Override
|
||||||
public void deregisterInstance(String applicationName, String ip, Integer port) {
|
public void deregisterInstance(String applicationName, String ip, Integer port) {
|
||||||
try {
|
try {
|
||||||
this.sidecarNacosDiscoveryProperties.namingServiceInstance()
|
this.nacosDiscoveryProperties.namingServiceInstance().deregisterInstance(
|
||||||
.deregisterInstance(applicationName, ip, port);
|
applicationName, nacosDiscoveryProperties.getGroup(), ip, port);
|
||||||
}
|
}
|
||||||
catch (NacosException e) {
|
catch (NacosException e) {
|
||||||
log.warn("nacos exception happens", e);
|
log.warn("nacos exception happens", e);
|
||||||
|
@ -1,49 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2013-2018 the original author or authors.
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
*
|
|
||||||
* https://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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.alibaba.cloud.sidecar.nacos;
|
|
||||||
|
|
||||||
import java.net.SocketException;
|
|
||||||
|
|
||||||
import com.alibaba.cloud.nacos.NacosDiscoveryProperties;
|
|
||||||
import com.alibaba.cloud.sidecar.SidecarProperties;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author itmuch.com
|
|
||||||
*/
|
|
||||||
public class SidecarNacosDiscoveryProperties extends NacosDiscoveryProperties {
|
|
||||||
|
|
||||||
private final SidecarProperties sidecarProperties;
|
|
||||||
|
|
||||||
public SidecarNacosDiscoveryProperties(SidecarProperties sidecarProperties) {
|
|
||||||
this.sidecarProperties = sidecarProperties;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init() throws SocketException {
|
|
||||||
super.init();
|
|
||||||
|
|
||||||
String ip = sidecarProperties.getIp();
|
|
||||||
if (StringUtils.isNotBlank(ip)) {
|
|
||||||
this.setIp(ip);
|
|
||||||
}
|
|
||||||
|
|
||||||
Integer port = sidecarProperties.getPort();
|
|
||||||
this.setPort(port);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@ -91,7 +91,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.zookeeper</groupId>
|
<groupId>org.apache.zookeeper</groupId>
|
||||||
<artifactId>zookeeper</artifactId>
|
<artifactId>zookeeper</artifactId>
|
||||||
<version>3.4.12</version>
|
<version>3.4.14</version>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
|
@ -30,7 +30,7 @@ import org.springframework.cloud.client.loadbalancer.LoadBalanced;
|
|||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
import static org.apache.dubbo.rpc.cluster.Constants.DEFAULT_RETRIES;
|
import static org.apache.dubbo.common.constants.CommonConstants.DEFAULT_RETRIES;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link DubboTransported @DubboTransported} annotation indicates that the traditional
|
* {@link DubboTransported @DubboTransported} annotation indicates that the traditional
|
||||||
|
@ -29,7 +29,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
|
|||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import static com.alibaba.cloud.dubbo.registry.SpringCloudRegistryFactory.PROTOCOL;
|
import static com.alibaba.cloud.dubbo.registry.SpringCloudRegistryFactory.PROTOCOL;
|
||||||
import static org.apache.dubbo.config.spring.util.PropertySourcesUtils.getPrefixedProperties;
|
import static com.alibaba.spring.util.PropertySourcesUtils.getSubProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Missing {@link SpringCloudRegistry} Property {@link Condition}.
|
* Missing {@link SpringCloudRegistry} Property {@link Condition}.
|
||||||
@ -61,7 +61,7 @@ public class MissingSpringCloudRegistryConfigPropertyCondition
|
|||||||
"'spring-cloud' protocol was found from 'dubbo.registry.address'");
|
"'spring-cloud' protocol was found from 'dubbo.registry.address'");
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Object> properties = getPrefixedProperties(
|
Map<String, Object> properties = getSubProperties(
|
||||||
environment.getPropertySources(), "dubbo.registries.");
|
environment.getPropertySources(), "dubbo.registries.");
|
||||||
|
|
||||||
boolean found = properties.entrySet().stream().anyMatch(entry -> {
|
boolean found = properties.entrySet().stream().anyMatch(entry -> {
|
||||||
|
@ -34,8 +34,8 @@ import org.springframework.core.env.PropertySource;
|
|||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.util.StringUtils;
|
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.common.constants.CommonConstants.DEFAULT_PROTOCOL;
|
||||||
import static org.apache.dubbo.config.spring.util.PropertySourcesUtils.getPrefixedProperties;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dubbo {@link WebApplicationType#NONE Non-Web Application}
|
* Dubbo {@link WebApplicationType#NONE Non-Web Application}
|
||||||
@ -149,7 +149,7 @@ public class DubboNonWebApplicationEnvironmentPostProcessor
|
|||||||
|
|
||||||
String restPort = null;
|
String restPort = null;
|
||||||
|
|
||||||
Map<String, Object> subProperties = getPrefixedProperties(
|
Map<String, Object> subProperties = getSubProperties(
|
||||||
environment.getPropertySources(), PROTOCOLS_PROPERTY_NAME_PREFIX);
|
environment.getPropertySources(), PROTOCOLS_PROPERTY_NAME_PREFIX);
|
||||||
|
|
||||||
Properties properties = new Properties();
|
Properties properties = new Properties();
|
||||||
|
@ -22,6 +22,7 @@ import java.util.LinkedHashSet;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
@ -289,10 +290,12 @@ public class DubboServiceMetadataRepository
|
|||||||
serviceName);
|
serviceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
initSubscribedDubboMetadataService(serviceName);
|
if (initSubscribedDubboMetadataService(serviceName)) {
|
||||||
// mark this service name having been initialized
|
// mark this service name having been initialized
|
||||||
initializedServices.add(serviceName);
|
initializedServices.add(serviceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -300,12 +303,19 @@ public class DubboServiceMetadataRepository
|
|||||||
* Remove the metadata and initialized service of Dubbo Services if no there is no
|
* Remove the metadata and initialized service of Dubbo Services if no there is no
|
||||||
* service instance.
|
* service instance.
|
||||||
* @param serviceName the service name
|
* @param serviceName the service name
|
||||||
|
* @param url the meta service url
|
||||||
*/
|
*/
|
||||||
public void removeMetadataAndInitializedService(String serviceName) {
|
public void removeMetadataAndInitializedService(String serviceName, URL url) {
|
||||||
synchronized (monitor) {
|
synchronized (monitor) {
|
||||||
initializedServices.remove(serviceName);
|
initializedServices.remove(serviceName);
|
||||||
dubboRestServiceMetadataRepository.remove(serviceName);
|
dubboRestServiceMetadataRepository.remove(serviceName);
|
||||||
subscribedDubboMetadataServiceURLs.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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -614,24 +624,47 @@ public class DubboServiceMetadataRepository
|
|||||||
subscribedServices.remove(currentApplicationName);
|
subscribedServices.remove(currentApplicationName);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void initSubscribedDubboMetadataService(String serviceName) {
|
protected Boolean initSubscribedDubboMetadataService(String serviceName) {
|
||||||
metadataServiceInstanceSelector.choose(discoveryClient.getInstances(serviceName))
|
// this need to judge whether the initialization is successful or not. The failed
|
||||||
.map(this::getDubboMetadataServiceURLs)
|
// initialization will not change the initializedServices
|
||||||
.ifPresent(dubboMetadataServiceURLs -> {
|
Optional<ServiceInstance> optionalServiceInstance = metadataServiceInstanceSelector
|
||||||
dubboMetadataServiceURLs.forEach(dubboMetadataServiceURL -> {
|
.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 {
|
try {
|
||||||
initSubscribedDubboMetadataServiceURL(
|
initSubscribedDubboMetadataServiceURL(dubboMetadataServiceURL);
|
||||||
|
DubboMetadataService dubboMetadataService = dubboMetadataConfigServiceProxy
|
||||||
|
.getProxy(serviceName);
|
||||||
|
if (dubboMetadataService == null) {
|
||||||
|
dubboMetadataService = initDubboMetadataServiceProxy(
|
||||||
dubboMetadataServiceURL);
|
dubboMetadataServiceURL);
|
||||||
initDubboMetadataServiceProxy(dubboMetadataServiceURL);
|
}
|
||||||
|
|
||||||
|
if (dubboMetadataService == null) {
|
||||||
|
removeMetadataAndInitializedService(serviceName,
|
||||||
|
dubboMetadataServiceURL);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Throwable e) {
|
catch (Throwable e) {
|
||||||
if (logger.isErrorEnabled()) {
|
if (logger.isErrorEnabled()) {
|
||||||
logger.error(e.getMessage(), e);
|
logger.error(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
});
|
|
||||||
initDubboRestServiceMetadataRepository(serviceName);
|
initDubboRestServiceMetadataRepository(serviceName);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initSubscribedDubboMetadataServiceURL(URL dubboMetadataServiceURL) {
|
private void initSubscribedDubboMetadataServiceURL(URL dubboMetadataServiceURL) {
|
||||||
@ -640,11 +673,13 @@ public class DubboServiceMetadataRepository
|
|||||||
subscribedDubboMetadataServiceURLs.add(serviceKey, dubboMetadataServiceURL);
|
subscribedDubboMetadataServiceURLs.add(serviceKey, dubboMetadataServiceURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initDubboMetadataServiceProxy(URL dubboMetadataServiceURL) {
|
private DubboMetadataService initDubboMetadataServiceProxy(
|
||||||
|
URL dubboMetadataServiceURL) {
|
||||||
String serviceName = dubboMetadataServiceURL.getParameter(APPLICATION_KEY);
|
String serviceName = dubboMetadataServiceURL.getParameter(APPLICATION_KEY);
|
||||||
String version = dubboMetadataServiceURL.getParameter(VERSION_KEY);
|
String version = dubboMetadataServiceURL.getParameter(VERSION_KEY);
|
||||||
// Initialize DubboMetadataService with right version
|
// Initialize DubboMetadataService with right version
|
||||||
dubboMetadataConfigServiceProxy.initProxy(serviceName, version);
|
return dubboMetadataConfigServiceProxy.initProxy(serviceName, version);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,9 +48,11 @@ import static java.util.Collections.emptyList;
|
|||||||
import static org.apache.dubbo.common.URLBuilder.from;
|
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.GROUP_KEY;
|
||||||
import static org.apache.dubbo.common.constants.CommonConstants.PROTOCOL_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.PROVIDER_SIDE;
|
||||||
import static org.apache.dubbo.common.constants.CommonConstants.SIDE_KEY;
|
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.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.common.constants.RegistryConstants.EMPTY_PROTOCOL;
|
||||||
import static org.apache.dubbo.registry.Constants.ADMIN_PROTOCOL;
|
import static org.apache.dubbo.registry.Constants.ADMIN_PROTOCOL;
|
||||||
import static org.springframework.util.StringUtils.hasText;
|
import static org.springframework.util.StringUtils.hasText;
|
||||||
@ -161,6 +163,13 @@ public abstract class AbstractSpringCloudRegistry extends FailbackRegistry {
|
|||||||
}
|
}
|
||||||
else if (isDubboMetadataServiceURL(url)) { // for DubboMetadataService
|
else if (isDubboMetadataServiceURL(url)) { // for DubboMetadataService
|
||||||
subscribeDubboMetadataServiceURLs(url, listener);
|
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
|
else { // for general Dubbo Services
|
||||||
subscribeDubboServiceURLs(url, listener);
|
subscribeDubboServiceURLs(url, listener);
|
||||||
@ -228,10 +237,13 @@ public abstract class AbstractSpringCloudRegistry extends FailbackRegistry {
|
|||||||
// Re-obtain the latest list of available metadata address here, ip or port may
|
// Re-obtain the latest list of available metadata address here, ip or port may
|
||||||
// change.
|
// change.
|
||||||
// by https://github.com/wangzihaogithub
|
// by https://github.com/wangzihaogithub
|
||||||
dubboMetadataConfigServiceProxy.removeProxy(serviceName);
|
// When the last service provider is closed, 【fix 1259】while close the
|
||||||
repository.removeMetadataAndInitializedService(serviceName);
|
// channel,when up a new provider then repository.initializeMetadata(serviceName)
|
||||||
dubboGenericServiceFactory.destroy(serviceName);
|
// will throw Exception.
|
||||||
repository.initializeMetadata(serviceName);
|
// dubboMetadataConfigServiceProxy.removeProxy(serviceName);
|
||||||
|
// repository.removeMetadataAndInitializedService(serviceName);
|
||||||
|
// dubboGenericServiceFactory.destroy(serviceName);
|
||||||
|
// repository.initializeMetadata(serviceName);
|
||||||
if (CollectionUtils.isEmpty(serviceInstances)) {
|
if (CollectionUtils.isEmpty(serviceInstances)) {
|
||||||
if (logger.isWarnEnabled()) {
|
if (logger.isWarnEnabled()) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
@ -239,6 +251,18 @@ public abstract class AbstractSpringCloudRegistry extends FailbackRegistry {
|
|||||||
+ "available , please make sure the further impact",
|
+ "available , please make sure the further impact",
|
||||||
serviceName, url.getServiceKey());
|
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}
|
* URLs with {@link RegistryConstants#EMPTY_PROTOCOL}
|
||||||
*/
|
*/
|
||||||
@ -250,6 +274,11 @@ public abstract class AbstractSpringCloudRegistry extends FailbackRegistry {
|
|||||||
listener.notify(allSubscribedURLs);
|
listener.notify(allSubscribedURLs);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (isDubboMetadataServiceURL(url)) {
|
||||||
|
// Prevent duplicate generation of DubboMetadataService
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
repository.initializeMetadata(serviceName);
|
||||||
|
|
||||||
DubboMetadataService dubboMetadataService = dubboMetadataConfigServiceProxy
|
DubboMetadataService dubboMetadataService = dubboMetadataConfigServiceProxy
|
||||||
.getProxy(serviceName);
|
.getProxy(serviceName);
|
||||||
@ -301,7 +330,11 @@ public abstract class AbstractSpringCloudRegistry extends FailbackRegistry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<URL> emptyURLs(URL url) {
|
private List<URL> emptyURLs(URL url) {
|
||||||
return asList(from(url).setProtocol(EMPTY_PROTOCOL).build());
|
// 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());
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<ServiceInstance> getServiceInstances(String serviceName) {
|
private List<ServiceInstance> getServiceInstances(String serviceName) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
<artifactId>spring-cloud-alibaba-starters</artifactId>
|
||||||
<version>2.2.1.BUILD-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user