From c3db7fdc9145f276dfc6cf3fd3034fcc06b2d364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=BE=E5=93=92?= Date: Fri, 15 Jan 2021 16:06:52 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E9=94=99=E8=AF=AF=E7=9A=84URL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nacos-example/nacos-discovery-example/readme.md | 2 +- spring-cloud-alibaba-examples/rocketmq-example/readme.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-cloud-alibaba-examples/nacos-example/nacos-discovery-example/readme.md b/spring-cloud-alibaba-examples/nacos-example/nacos-discovery-example/readme.md index 0946cf9a7..3bf0cf3a2 100644 --- a/spring-cloud-alibaba-examples/nacos-example/nacos-discovery-example/readme.md +++ b/spring-cloud-alibaba-examples/nacos-example/nacos-discovery-example/readme.md @@ -72,7 +72,7 @@ Before we start the demo, let's learn how to connect Nacos Config to a Spring Cl #### Query Service -Enter `http://127.0.0.1:8848/nacos/v1/ns/instances?serviceName=service-provider` in the browser address bar and click Go to, we can see that the service node has been successfully registered to Nacos Server. +Enter `http://127.0.0.1:8848/nacos/#/serviceDetail?name=service-provider&groupName=DEFAULT_GROUP` in the browser address bar and click Go to, we can see that the service node has been successfully registered to Nacos Server. ![查询服务](https://cdn.nlark.com/lark/0/2018/png/54319/1536986288092-5cf96af9-9a26-466b-85f6-39ad1d92dfdc.png) diff --git a/spring-cloud-alibaba-examples/rocketmq-example/readme.md b/spring-cloud-alibaba-examples/rocketmq-example/readme.md index dc9490c60..eec6675f9 100644 --- a/spring-cloud-alibaba-examples/rocketmq-example/readme.md +++ b/spring-cloud-alibaba-examples/rocketmq-example/readme.md @@ -73,7 +73,7 @@ spring.cloud.stream.bindings.input.group=test-group You should startup Name Server and Broker before using RocketMQ Binder. -1. Download [RocketMQ](https://www.apache.org/dyn/closer.cgi?path=rocketmq/4.3.2/rocketmq-all-4.3.2-bin-release.zip) and unzip it. +1. Download [RocketMQ](https://archive.apache.org/dist/rocketmq/4.3.2/rocketmq-all-4.3.2-bin-release.zip) and unzip it. 2. Startup Name Server From 918f5c10f052edaf22bb39ea32fe4b746af30684 Mon Sep 17 00:00:00 2001 From: ppzzyy11 Date: Fri, 15 Jan 2021 16:55:36 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=A4=9A=E7=BB=99=E4=B8=AA=E7=A9=BA?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index cc75f59c9..a9048fa62 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ With Spring Cloud Alibaba, you only need to add some annotations and a small amo For more features, please refer to [Roadmap](https://github.com/alibaba/spring-cloud-alibaba/blob/master/Roadmap.md). + ## Components **[Sentinel](https://github.com/alibaba/Sentinel)**: Sentinel takes "traffic flow" as the breakthrough point, and provides solutions in areas such as flow control, concurrency, circuit breaking, and load protection to protect service stability. From 441bcb9124098f781e9c24535945f1e0c4d7b6fb Mon Sep 17 00:00:00 2001 From: "mai.jh" Date: Tue, 19 Jan 2021 15:45:45 +0800 Subject: [PATCH 3/6] for: #1931 ,Add a reset Nacos Log Config listener. --- .../nacos/logging/NacosLoggingListener.java | 54 +++++++++++++++++++ .../main/resources/META-INF/spring.factories | 4 +- .../logging/NacosLoggingListener.java | 54 +++++++++++++++++++ .../main/resources/META-INF/spring.factories | 2 + 4 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config/src/main/java/com/alibaba/cloud/nacos/logging/NacosLoggingListener.java create mode 100644 spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/main/java/com/alibaba/cloud/nacos/discovery/logging/NacosLoggingListener.java diff --git a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config/src/main/java/com/alibaba/cloud/nacos/logging/NacosLoggingListener.java b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config/src/main/java/com/alibaba/cloud/nacos/logging/NacosLoggingListener.java new file mode 100644 index 000000000..41d5842ec --- /dev/null +++ b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config/src/main/java/com/alibaba/cloud/nacos/logging/NacosLoggingListener.java @@ -0,0 +1,54 @@ +/* + * 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.nacos.logging; + +import com.alibaba.nacos.client.logging.NacosLogging; + +import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; +import org.springframework.context.ApplicationEvent; +import org.springframework.context.event.GenericApplicationListener; +import org.springframework.core.Ordered; +import org.springframework.core.ResolvableType; + +/** + * Reload nacos log configuration file, after + * {@link org.springframework.boot.context.logging.LoggingApplicationListener}. + * + * @author mai.jh + */ +public class NacosLoggingListener implements GenericApplicationListener { + + @Override + public boolean supportsEventType(ResolvableType resolvableType) { + Class type = resolvableType.getRawClass(); + if (type != null) { + return ApplicationEnvironmentPreparedEvent.class.isAssignableFrom(type); + } + return false; + } + + @Override + public void onApplicationEvent(ApplicationEvent applicationEvent) { + NacosLogging.getInstance().loadConfiguration(); + } + + @Override + public int getOrder() { + return Ordered.HIGHEST_PRECEDENCE + 21; + } + +} diff --git a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config/src/main/resources/META-INF/spring.factories b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config/src/main/resources/META-INF/spring.factories index aa6bf0d92..a7ee06a44 100644 --- a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config/src/main/resources/META-INF/spring.factories +++ b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config/src/main/resources/META-INF/spring.factories @@ -7,4 +7,6 @@ org.springframework.boot.diagnostics.FailureAnalyzer=\ com.alibaba.cloud.nacos.diagnostics.analyzer.NacosConnectionFailureAnalyzer org.springframework.boot.env.PropertySourceLoader=\ com.alibaba.cloud.nacos.parser.NacosJsonPropertySourceLoader,\ -com.alibaba.cloud.nacos.parser.NacosXmlPropertySourceLoader \ No newline at end of file +com.alibaba.cloud.nacos.parser.NacosXmlPropertySourceLoader +org.springframework.context.ApplicationListener=\ +com.alibaba.cloud.nacos.logging.NacosLoggingListener \ No newline at end of file diff --git a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/main/java/com/alibaba/cloud/nacos/discovery/logging/NacosLoggingListener.java b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/main/java/com/alibaba/cloud/nacos/discovery/logging/NacosLoggingListener.java new file mode 100644 index 000000000..91822ace6 --- /dev/null +++ b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/main/java/com/alibaba/cloud/nacos/discovery/logging/NacosLoggingListener.java @@ -0,0 +1,54 @@ +/* + * 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.nacos.discovery.logging; + +import com.alibaba.nacos.client.logging.NacosLogging; + +import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; +import org.springframework.context.ApplicationEvent; +import org.springframework.context.event.GenericApplicationListener; +import org.springframework.core.Ordered; +import org.springframework.core.ResolvableType; + +/** + * Reload nacos log configuration file, after + * {@link org.springframework.boot.context.logging.LoggingApplicationListener}. + * + * @author mai.jh + */ +public class NacosLoggingListener implements GenericApplicationListener { + + @Override + public boolean supportsEventType(ResolvableType resolvableType) { + Class type = resolvableType.getRawClass(); + if (type != null) { + return ApplicationEnvironmentPreparedEvent.class.isAssignableFrom(type); + } + return false; + } + + @Override + public void onApplicationEvent(ApplicationEvent applicationEvent) { + NacosLogging.getInstance().loadConfiguration(); + } + + @Override + public int getOrder() { + return Ordered.HIGHEST_PRECEDENCE + 21; + } + +} diff --git a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/main/resources/META-INF/spring.factories b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/main/resources/META-INF/spring.factories index 80befe757..dad08529a 100644 --- a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/main/resources/META-INF/spring.factories +++ b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/main/resources/META-INF/spring.factories @@ -9,3 +9,5 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ com.alibaba.cloud.nacos.NacosServiceAutoConfiguration org.springframework.cloud.bootstrap.BootstrapConfiguration=\ com.alibaba.cloud.nacos.discovery.configclient.NacosDiscoveryClientConfigServiceBootstrapConfiguration +org.springframework.context.ApplicationListener=\ + com.alibaba.cloud.nacos.discovery.logging.NacosLoggingListener From b2b9401d2b1caa8b1e0aecdbf393f688ca8b2140 Mon Sep 17 00:00:00 2001 From: TheoneFx Date: Mon, 1 Feb 2021 10:10:35 +0800 Subject: [PATCH 4/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index af71f00c4..2e2d66eff 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ These artifacts are available from Maven Central and Spring Release repository v com.alibaba.cloud spring-cloud-alibaba-dependencies - 2.2.4.RELEASE + 2.2.5.RELEASE pom import From 5a9347a6833051a87a6733cddfd6c1865bdec779 Mon Sep 17 00:00:00 2001 From: TheoneFx Date: Mon, 1 Feb 2021 10:11:10 +0800 Subject: [PATCH 5/6] Update README-zh.md --- README-zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-zh.md b/README-zh.md index 70a6101f1..a52b26ffb 100644 --- a/README-zh.md +++ b/README-zh.md @@ -70,7 +70,7 @@ Spring Cloud 使用 Maven 来构建,最快的使用方式是将本项目 clone com.alibaba.cloud spring-cloud-alibaba-dependencies - 2.2.4.RELEASE + 2.2.5.RELEASE pom import From ee1e5d36efb5058822475651144525b1da6e5dd9 Mon Sep 17 00:00:00 2001 From: theonefx Date: Sat, 20 Feb 2021 14:31:40 +0800 Subject: [PATCH 6/6] Use spring.cloud.version instead of the version number of each component --- pom.xml | 95 ++----------------- spring-cloud-alibaba-dependencies/pom.xml | 2 +- .../pom.xml | 1 - .../pom.xml | 1 - .../pom.xml | 1 - .../pom.xml | 6 -- .../pom.xml | 6 -- .../pom.xml | 6 -- .../spring-cloud-starter-dubbo/pom.xml | 2 - 9 files changed, 9 insertions(+), 111 deletions(-) diff --git a/pom.xml b/pom.xml index 7f9f0f88b..0208a34b4 100644 --- a/pom.xml +++ b/pom.xml @@ -80,18 +80,10 @@ - 2.2.5.RC2 + 2.2.6-SNAPSHOT - - 2.2.5.RELEASE - 2.2.5.RELEASE - 2.2.5.RELEASE - 2.2.3.RELEASE - 2.2.5.RELEASE - Horsham.SR3 - 2.2.4.RELEASE - 2.2.5.RELEASE - 2.2.3.RELEASE + + Hoxton.SR9 2.7.8 @@ -132,89 +124,18 @@ import - - com.alibaba.cloud - spring-cloud-alibaba-dependencies - ${project.version} - pom - import - - - - org.springframework.cloud - spring-cloud-commons-dependencies - ${spring-cloud-commons.version} - pom - import - - - - org.springframework.cloud - spring-cloud-test-support - test - ${spring-cloud-commons.version} - - - - org.springframework.cloud - spring-cloud-netflix-dependencies - ${spring-cloud-netflix.version} - pom - import - - - - org.springframework.cloud - spring-cloud-openfeign-dependencies - ${spring-cloud-openfeign.version} - pom - import - - - - org.springframework.cloud - spring-cloud-config-dependencies - ${spring-cloud-config.version} - pom - import - - org.springframework.cloud - spring-cloud-bus-dependencies - ${spring-cloud-bus.version} + spring-cloud-dependencies + ${spring.cloud.version} pom import - org.springframework.cloud - spring-cloud-gateway-dependencies - ${spring-cloud-gateway.version} - pom - import - - - - org.springframework.cloud - spring-cloud-stream-dependencies - ${spring-cloud-stream.version} - pom - import - - - - org.springframework.cloud - spring-cloud-consul-dependencies - ${spring-cloud-consul.version} - pom - import - - - - org.springframework.cloud - spring-cloud-zookeeper-dependencies - ${spring-cloud-zookeeper.version} + com.alibaba.cloud + spring-cloud-alibaba-dependencies + ${project.version} pom import diff --git a/spring-cloud-alibaba-dependencies/pom.xml b/spring-cloud-alibaba-dependencies/pom.xml index 1fdaf8695..18599e51e 100644 --- a/spring-cloud-alibaba-dependencies/pom.xml +++ b/spring-cloud-alibaba-dependencies/pom.xml @@ -18,7 +18,7 @@ Spring Cloud Alibaba Dependencies - 2.2.5.RC2 + 2.2.6-SNAPSHOT 1.8.0 1.3.0 1.4.1 diff --git a/spring-cloud-alibaba-examples/spring-cloud-alibaba-dubbo-examples/spring-cloud-dubbo-consumer-sample/pom.xml b/spring-cloud-alibaba-examples/spring-cloud-alibaba-dubbo-examples/spring-cloud-dubbo-consumer-sample/pom.xml index 3b855121c..123a92a0d 100644 --- a/spring-cloud-alibaba-examples/spring-cloud-alibaba-dubbo-examples/spring-cloud-dubbo-consumer-sample/pom.xml +++ b/spring-cloud-alibaba-examples/spring-cloud-alibaba-dubbo-examples/spring-cloud-dubbo-consumer-sample/pom.xml @@ -99,7 +99,6 @@ org.springframework.cloud spring-cloud-starter-consul-discovery - ${spring-cloud-consul.version} diff --git a/spring-cloud-alibaba-examples/spring-cloud-alibaba-dubbo-examples/spring-cloud-dubbo-provider-sample/pom.xml b/spring-cloud-alibaba-examples/spring-cloud-alibaba-dubbo-examples/spring-cloud-dubbo-provider-sample/pom.xml index d7e932e7f..5023d4fd9 100644 --- a/spring-cloud-alibaba-examples/spring-cloud-alibaba-dubbo-examples/spring-cloud-dubbo-provider-sample/pom.xml +++ b/spring-cloud-alibaba-examples/spring-cloud-alibaba-dubbo-examples/spring-cloud-dubbo-provider-sample/pom.xml @@ -90,7 +90,6 @@ org.springframework.cloud spring-cloud-starter-consul-discovery - ${spring-cloud-consul.version} diff --git a/spring-cloud-alibaba-examples/spring-cloud-alibaba-dubbo-examples/spring-cloud-dubbo-provider-web-sample/pom.xml b/spring-cloud-alibaba-examples/spring-cloud-alibaba-dubbo-examples/spring-cloud-dubbo-provider-web-sample/pom.xml index d434ebb10..95999e0fb 100644 --- a/spring-cloud-alibaba-examples/spring-cloud-alibaba-dubbo-examples/spring-cloud-dubbo-provider-web-sample/pom.xml +++ b/spring-cloud-alibaba-examples/spring-cloud-alibaba-dubbo-examples/spring-cloud-dubbo-provider-web-sample/pom.xml @@ -89,7 +89,6 @@ org.springframework.cloud spring-cloud-starter-consul-discovery - ${spring-cloud-consul.version} diff --git a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config-server/pom.xml b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config-server/pom.xml index 483914cf8..a17aae08b 100644 --- a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config-server/pom.xml +++ b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config-server/pom.xml @@ -51,12 +51,6 @@ test - - org.springframework.cloud - spring-cloud-test-support - test - - org.springframework.boot spring-boot-starter diff --git a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config/pom.xml b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config/pom.xml index 0a36d2c80..371ac977d 100644 --- a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config/pom.xml +++ b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-config/pom.xml @@ -85,12 +85,6 @@ test - - org.springframework.cloud - spring-cloud-test-support - test - - org.powermock diff --git a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/pom.xml b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/pom.xml index 02a3c3e39..dae98efda 100644 --- a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/pom.xml +++ b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/pom.xml @@ -111,12 +111,6 @@ test - - org.springframework.cloud - spring-cloud-test-support - test - - io.projectreactor reactor-test diff --git a/spring-cloud-alibaba-starters/spring-cloud-starter-dubbo/pom.xml b/spring-cloud-alibaba-starters/spring-cloud-starter-dubbo/pom.xml index 34b013b77..b404252b1 100644 --- a/spring-cloud-alibaba-starters/spring-cloud-starter-dubbo/pom.xml +++ b/spring-cloud-alibaba-starters/spring-cloud-starter-dubbo/pom.xml @@ -78,7 +78,6 @@ org.springframework.cloud spring-cloud-starter-zookeeper-discovery - ${spring-cloud-zookeeper.version} true @@ -112,7 +111,6 @@ org.springframework.cloud spring-cloud-starter-consul-discovery - ${spring-cloud-consul.version} true