diff --git a/spring-cloud-alibaba-coverage/pom.xml b/spring-cloud-alibaba-coverage/pom.xml
index 2487908b3d..d05bf6ada8 100644
--- a/spring-cloud-alibaba-coverage/pom.xml
+++ b/spring-cloud-alibaba-coverage/pom.xml
@@ -15,19 +15,70 @@
spring-cloud-alibaba-coverage
Spring Cloud Alibaba Coverage
-
- 2.2.1.BUILD-SNAPSHOT
-
com.alibaba.cloud
spring-cloud-alibaba-sentinel-datasource
- ${spring.cloud.alibaba.version}
+ ${project.version}
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-sentinel
+ ${project.version}
+
+
+
+ com.alibaba.cloud
+ spring-cloud-circuitbreaker-sentinel
+ ${project.version}
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-seata
+ ${project.version}
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+ ${project.version}
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+ ${project.version}
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config-server
+ ${project.version}
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-stream-rocketmq
+ ${project.version}
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-bus-rocketmq
+ ${project.version}
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-sidecar
+ ${project.version}
+
+
com.alibaba.cloud
- spring-cloud-alicloud-context
- ${spring.cloud.alibaba.version}
+ spring-cloud-starter-dubbo
+ ${project.version}
diff --git a/spring-cloud-alibaba-dependencies/pom.xml b/spring-cloud-alibaba-dependencies/pom.xml
index f0f0148a0d..7f28bdf226 100644
--- a/spring-cloud-alibaba-dependencies/pom.xml
+++ b/spring-cloud-alibaba-dependencies/pom.xml
@@ -38,62 +38,6 @@
-
-
- com.alibaba.cloud
- alicloud-context
- ${alicloud.context.version}
-
-
-
- com.aliyun
- aliyun-java-sdk-edas
- ${aliyun.sdk.edas.version}
-
-
- com.aliyun
- aliyun-java-sdk-core
-
-
-
-
-
- com.aliyun
- aliyun-java-sdk-core
- ${aliyun.sdk.version}
-
-
-
- com.alibaba.ans
- ans-sdk
- ${ans.version}
-
-
-
- com.alibaba.edas.acm
- acm-sdk
- ${acm.version}
-
-
-
- com.alibaba.edas
- schedulerX-client
- ${schedulerX.client.version}
-
-
-
-
- com.aliyun.mns
- aliyun-sdk-mns
- ${aliyun.sdk.mns}
-
-
-
- com.aliyun
- aliyun-java-sdk-dysmsapi
- ${aliyun.java.sdk.dysmsapi}
-
-
com.alibaba.nacos
@@ -232,13 +176,6 @@
${seata.version}
-
-
- com.aliyun.oss
- aliyun-sdk-oss
- ${oss.version}
-
-
com.alibaba.cloud
@@ -251,12 +188,6 @@
${project.version}
-
- com.alibaba.cloud
- spring-cloud-alicloud-context
- ${project.version}
-
-
com.alibaba.cloud
@@ -270,12 +201,6 @@
${project.version}
-
- com.alibaba.cloud
- spring-cloud-starter-alicloud-oss
- ${project.version}
-
-
com.alibaba.cloud
spring-cloud-starter-alibaba-seata
@@ -299,24 +224,6 @@
${project.version}
-
- com.alibaba.cloud
- spring-cloud-starter-alicloud-ans
- ${project.version}
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alicloud-acm
- ${project.version}
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alicloud-schedulerx
- ${project.version}
-
-
com.alibaba.cloud
spring-cloud-starter-stream-rocketmq
@@ -335,13 +242,6 @@
${project.version}
-
-
- com.alibaba.cloud
- spring-cloud-starter-alicloud-sms
- ${project.version}
-
-
com.alibaba.cloud
diff --git a/spring-cloud-alibaba-examples/acm-example/acm-local-example/pom.xml b/spring-cloud-alibaba-examples/acm-example/acm-local-example/pom.xml
deleted file mode 100644
index 7d0760af6d..0000000000
--- a/spring-cloud-alibaba-examples/acm-example/acm-local-example/pom.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
- spring-cloud-alibaba-examples
- com.alibaba.cloud
- 2.2.1.BUILD-SNAPSHOT
- ../../pom.xml
-
- 4.0.0
- acm-local-example
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alicloud-acm
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
-
\ No newline at end of file
diff --git a/spring-cloud-alibaba-examples/acm-example/acm-local-example/readme-zh.md b/spring-cloud-alibaba-examples/acm-example/acm-local-example/readme-zh.md
deleted file mode 100644
index f76577aa96..0000000000
--- a/spring-cloud-alibaba-examples/acm-example/acm-local-example/readme-zh.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# ACM Local Example
-
-## 项目说明
-
-本项目展示了,在Spring Cloud规范下,如何以最简单且免费的方式,使用ACM产品,将配置统一管理。
-
-应用配置管理(Application Configuration Management,简称 ACM),其前身为淘宝内部配置中心 Diamond,是一款应用配置中心产品。基于该应用配置中心产品,您可以在微服务、DevOps、大数据等场景下极大地减轻配置管理的工作量的同时,保证配置的安全合规。更多 ACM 相关的信息,请参考 [ACM官网](https://www.aliyun.com/product/acm)。
-
-## 示例
-
-### 准备工作
-
-ACM支持直接使用免费的轻量版配置中心,进行开发和调试工作。本示例也是基于轻量版配置中心的,因此我们需要首先安装和启动轻量版配置中心。
-
-1. [下载轻量版配置中心](https://edas-public.oss-cn-hangzhou.aliyuncs.com/install_package/LCC/2018-11-01/edas-lite-configcenter.tar.gz?file=edas-lite-configcenter.tar.gz)
-
-2. 解压 edas-lite-configcenter.tar.gz ,然后执行以下命令。
-
- cd edas-config-center && sh startup.sh
-
-出现以下内容说明轻量版配置中心启动成功。
-
- Edas-config-center has been started successfully.
- You can see more details in logs/config-center.log.
-
-3. 进入页面 http://127.0.0.1:8080,在左侧"配置列表"页面中,点击"添加"按钮,添加如下配置。
-
- Group:DEFAULT_GROUP
- DataId:acm-local.properties
- Content:user.id=xiaolongzuo
-
-### 启动应用
-
-直接运行main class,即`AcmApplication`。
-
-### 查看效果
-
-1. 使用`curl`可以看到在配置中心配置的user.id。
-
- curl http://127.0.0.1:18089/
-
-2. 进入页面 http://127.0.0.1:8080,在左侧"配置列表"页面中,更改user.id的值以后,再次使用`curl`命令,可以看到配置变化。
-
-
-如果您对 Spring Cloud ACM Starter 有任何建议或想法,欢迎提交 issue 中或者通过其他社区渠道向我们反馈。
-
diff --git a/spring-cloud-alibaba-examples/acm-example/acm-local-example/src/main/java/com/alibaba/cloud/examples/AcmApplication.java b/spring-cloud-alibaba-examples/acm-example/acm-local-example/src/main/java/com/alibaba/cloud/examples/AcmApplication.java
deleted file mode 100644
index aa79ec97f2..0000000000
--- a/spring-cloud-alibaba-examples/acm-example/acm-local-example/src/main/java/com/alibaba/cloud/examples/AcmApplication.java
+++ /dev/null
@@ -1,34 +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.examples;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-
-/**
- * @author xiaolongzuo
- */
-@SpringBootApplication
-@EnableDiscoveryClient
-public class AcmApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(AcmApplication.class, args);
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/acm-example/acm-local-example/src/main/java/com/alibaba/cloud/examples/EchoController.java b/spring-cloud-alibaba-examples/acm-example/acm-local-example/src/main/java/com/alibaba/cloud/examples/EchoController.java
deleted file mode 100644
index 04bbc70c78..0000000000
--- a/spring-cloud-alibaba-examples/acm-example/acm-local-example/src/main/java/com/alibaba/cloud/examples/EchoController.java
+++ /dev/null
@@ -1,45 +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.examples;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @author xiaolongzuo
- */
-@RestController
-@RefreshScope
-public class EchoController {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(EchoController.class);
-
- @Value("${user.id}")
- private String userId;
-
- @RequestMapping("/")
- public String echo() {
- LOGGER.info("User id is " + userId);
- return userId;
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/acm-example/acm-local-example/src/main/resources/bootstrap.properties b/spring-cloud-alibaba-examples/acm-example/acm-local-example/src/main/resources/bootstrap.properties
deleted file mode 100644
index 7728d23072..0000000000
--- a/spring-cloud-alibaba-examples/acm-example/acm-local-example/src/main/resources/bootstrap.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-spring.application.name=acm-local
-server.port=18089
-spring.cloud.alicloud.acm.server-list=127.0.0.1
-spring.cloud.alicloud.acm.server-port=8080
-management.endpoints.web.exposure.include=*
-management.endpoint.health.show-details=always
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/pom.xml b/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/pom.xml
deleted file mode 100644
index 0242c80524..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/pom.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
- spring-cloud-alibaba-examples
- com.alibaba.cloud
- 2.2.1.BUILD-SNAPSHOT
- ../../pom.xml
-
- 4.0.0
- ans-consumer-feign-example
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alicloud-ans
-
-
- org.springframework.cloud
- spring-cloud-starter-openfeign
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
-
\ No newline at end of file
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/readme-zh.md b/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/readme-zh.md
deleted file mode 100644
index 4b8ad3728a..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/readme-zh.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# ANS Consumer Feign Example
-
-## 项目说明
-
-本项目展示了,在Spring Cloud规范下,如何以最简单且免费的方式,使用Feign客户端,调用一个服务。
-
-## 示例
-
-### 准备工作
-
-ans-provider-example已经成功启动,并发布服务成功。
-
-### 启动应用
-
-直接运行main class,即`ConsumerApplication`。
-
-### 查看效果
-
-使用`curl`命令可以看到应用打印出相应的调用日志,命令如下。
-
- curl http://127.0.0.1:18082/
-
-
-如果您对 Spring Cloud ANS Starter 有任何建议或想法,欢迎提交 issue 中或者通过其他社区渠道向我们反馈。
-
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/src/main/java/com/alibaba/cloud/examples/ConsumerApplication.java b/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/src/main/java/com/alibaba/cloud/examples/ConsumerApplication.java
deleted file mode 100644
index 25fc093894..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/src/main/java/com/alibaba/cloud/examples/ConsumerApplication.java
+++ /dev/null
@@ -1,34 +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.examples;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.openfeign.EnableFeignClients;
-
-/**
- * @author xiaolongzuo
- */
-@SpringBootApplication
-@EnableFeignClients(basePackages = { "com.alibaba.cloud.examples" })
-public class ConsumerApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(ConsumerApplication.class, args);
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/src/main/java/com/alibaba/cloud/examples/EchoService.java b/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/src/main/java/com/alibaba/cloud/examples/EchoService.java
deleted file mode 100644
index 7662f6d994..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/src/main/java/com/alibaba/cloud/examples/EchoService.java
+++ /dev/null
@@ -1,32 +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.examples;
-
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-/**
- * @author xiaolongzuo
- */
-@FeignClient("ans-provider")
-public interface EchoService {
-
- @RequestMapping(path = "echo/{str}")
- String echo(@RequestParam("str") String param);
-
-}
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/src/main/java/com/alibaba/cloud/examples/HomeController.java b/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/src/main/java/com/alibaba/cloud/examples/HomeController.java
deleted file mode 100644
index 453b5dd89e..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/src/main/java/com/alibaba/cloud/examples/HomeController.java
+++ /dev/null
@@ -1,47 +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.examples;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @author xiaolongzuo
- */
-@RestController
-public class HomeController {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(HomeController.class);
-
- @Autowired
- private EchoService echoService;
-
- @GetMapping(value = "/", produces = "application/json")
- public String home() {
- LOGGER.info("-----------------consumer调用开始-----------------");
- String param = "Nice to meet you.";
- LOGGER.info("消费者传递参数:" + param);
- String result = echoService.echo(param);
- LOGGER.info("收到提供者响应:" + result);
- return param + "
" + result;
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/src/main/resources/application.properties b/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/src/main/resources/application.properties
deleted file mode 100644
index 19219e43d0..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-consumer-feign-example/src/main/resources/application.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-spring.application.name=feign-consumer
-server.port=18083
-# The following configuration can be omitted.
-spring.cloud.alicloud.ans.server-list=127.0.0.1
-spring.cloud.alicloud.ans.server-port=8080
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-consumer-ribbon-example/pom.xml b/spring-cloud-alibaba-examples/ans-example/ans-consumer-ribbon-example/pom.xml
deleted file mode 100644
index 75ecbdc511..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-consumer-ribbon-example/pom.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
- spring-cloud-alibaba-examples
- com.alibaba.cloud
- 2.2.1.BUILD-SNAPSHOT
- ../../pom.xml
-
- 4.0.0
- ans-consumer-ribbon-example
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alicloud-ans
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
-
\ No newline at end of file
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-consumer-ribbon-example/readme-zh.md b/spring-cloud-alibaba-examples/ans-example/ans-consumer-ribbon-example/readme-zh.md
deleted file mode 100644
index b15eb89c6e..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-consumer-ribbon-example/readme-zh.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# ANS Consumer Ribbon Example
-
-## 项目说明
-
-本项目展示了,在Spring Cloud规范下,如何以最简单且免费的方式,使用Ribbon客户端,调用一个服务。
-
-## 示例
-
-### 准备工作
-
-ans-provider-example已经成功启动,并发布服务成功。
-
-### 启动应用
-
-直接运行main class,即`ConsumerApplication`。
-
-### 查看效果
-
-使用`curl`命令可以看到应用打印出相应的调用日志,命令如下。
-
- curl http://127.0.0.1:18082/
-
-
-如果您对 Spring Cloud ANS Starter 有任何建议或想法,欢迎提交 issue 中或者通过其他社区渠道向我们反馈。
-
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-consumer-ribbon-example/src/main/java/com/alibaba/cloud/examples/ConsumerApplication.java b/spring-cloud-alibaba-examples/ans-example/ans-consumer-ribbon-example/src/main/java/com/alibaba/cloud/examples/ConsumerApplication.java
deleted file mode 100644
index e83ba61140..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-consumer-ribbon-example/src/main/java/com/alibaba/cloud/examples/ConsumerApplication.java
+++ /dev/null
@@ -1,43 +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.examples;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.client.loadbalancer.LoadBalanced;
-import org.springframework.context.annotation.Bean;
-import org.springframework.web.client.RestTemplate;
-
-/**
- * @author xiaolongzuo
- */
-@SpringBootApplication
-@EnableDiscoveryClient
-public class ConsumerApplication {
-
- @Bean
- @LoadBalanced
- public RestTemplate restTemplate() {
- return new RestTemplate();
- }
-
- public static void main(String[] args) {
- SpringApplication.run(ConsumerApplication.class, args);
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-consumer-ribbon-example/src/main/java/com/alibaba/cloud/examples/HomeController.java b/spring-cloud-alibaba-examples/ans-example/ans-consumer-ribbon-example/src/main/java/com/alibaba/cloud/examples/HomeController.java
deleted file mode 100644
index a93c023d9d..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-consumer-ribbon-example/src/main/java/com/alibaba/cloud/examples/HomeController.java
+++ /dev/null
@@ -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.examples;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.client.RestTemplate;
-
-/**
- * @author xiaolongzuo
- */
-@RestController
-public class HomeController {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(HomeController.class);
-
- @Autowired
- private RestTemplate restTemplate;
-
- @GetMapping(value = "/", produces = "application/json")
- public String home() {
- LOGGER.info("-----------------consumer调用开始-----------------");
- String param = "Nice to meet you.";
- LOGGER.info("消费者传递参数:" + param);
- String result = restTemplate.getForObject("http://ans-provider/echo/" + param,
- String.class);
- LOGGER.info("收到提供者响应:" + result);
- return param + "
" + result;
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-consumer-ribbon-example/src/main/resources/application.properties b/spring-cloud-alibaba-examples/ans-example/ans-consumer-ribbon-example/src/main/resources/application.properties
deleted file mode 100644
index a70632242c..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-consumer-ribbon-example/src/main/resources/application.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-spring.application.name=ribbon-consumer
-server.port=18082
-# The following configuration can be omitted.
-spring.cloud.alicloud.ans.server-list=127.0.0.1
-spring.cloud.alicloud.ans.server-port=8080
-management.endpoints.web.exposure.include=*
-management.endpoint.health.show-details=always
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-provider-example/pom.xml b/spring-cloud-alibaba-examples/ans-example/ans-provider-example/pom.xml
deleted file mode 100644
index 923587027d..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-provider-example/pom.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
- spring-cloud-alibaba-examples
- com.alibaba.cloud
- 2.2.1.BUILD-SNAPSHOT
- ../../pom.xml
-
- 4.0.0
- ans-provider-example
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alicloud-ans
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
-
\ No newline at end of file
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-provider-example/readme-zh.md b/spring-cloud-alibaba-examples/ans-example/ans-provider-example/readme-zh.md
deleted file mode 100644
index 82b1587404..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-provider-example/readme-zh.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# ANS Provider Example
-
-## 项目说明
-
-本项目展示了,在Spring Cloud规范下,如何以最简单且免费的方式,发布一个服务。
-
-## 示例
-
-### 准备工作
-
-ANS支持直接使用免费的轻量版配置中心,进行开发和调试工作。本示例也是基于轻量版配置中心的,因此我们需要首先安装和启动轻量版配置中心。
-
-1. [下载轻量版配置中心](https://edas-public.oss-cn-hangzhou.aliyuncs.com/install_package/LCC/2018-11-01/edas-lite-configcenter.tar.gz?file=edas-lite-configcenter.tar.gz)
-
-2. 解压 edas-lite-configcenter.tar.gz ,然后执行以下命令。
-
- cd edas-config-center && sh startup.sh
-
-出现以下内容说明轻量版配置中心启动成功。
-
- Edas-config-center has been started successfully.
- You can see more details in logs/config-center.log.
-
-
-### 启动应用
-
-直接运行main class,即`ProviderApplication`。
-
-### 查看效果
-
-进入页面 http://127.0.0.1:8080,在左侧"服务列表"页面中,可以看到一条名为`ans-provider`的服务。
-
-
-如果您对 Spring Cloud ANS Starter 有任何建议或想法,欢迎提交 issue 中或者通过其他社区渠道向我们反馈。
-
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-provider-example/src/main/java/com/alibaba/cloud/examples/EchoController.java b/spring-cloud-alibaba-examples/ans-example/ans-provider-example/src/main/java/com/alibaba/cloud/examples/EchoController.java
deleted file mode 100644
index 07744adff7..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-provider-example/src/main/java/com/alibaba/cloud/examples/EchoController.java
+++ /dev/null
@@ -1,43 +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.examples;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @author xiaolongzuo
- */
-@RestController
-public class EchoController {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(EchoController.class);
-
- @GetMapping(value = "/echo/{str}", produces = "application/json")
- public String echo(@PathVariable String str) {
- LOGGER.info("-----------收到消费者请求-----------");
- LOGGER.info("收到消费者传递的参数:" + str);
- String result = "Nice to meet you, too.";
- LOGGER.info("提供者返回结果:" + result);
- return result;
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-provider-example/src/main/java/com/alibaba/cloud/examples/ProviderApplication.java b/spring-cloud-alibaba-examples/ans-example/ans-provider-example/src/main/java/com/alibaba/cloud/examples/ProviderApplication.java
deleted file mode 100644
index cba3781e73..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-provider-example/src/main/java/com/alibaba/cloud/examples/ProviderApplication.java
+++ /dev/null
@@ -1,34 +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.examples;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-
-/**
- * @author xiaolongzuo
- */
-@SpringBootApplication
-@EnableDiscoveryClient
-public class ProviderApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(ProviderApplication.class, args);
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/ans-example/ans-provider-example/src/main/resources/application.properties b/spring-cloud-alibaba-examples/ans-example/ans-provider-example/src/main/resources/application.properties
deleted file mode 100644
index 9202976443..0000000000
--- a/spring-cloud-alibaba-examples/ans-example/ans-provider-example/src/main/resources/application.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-spring.application.name=ans-provider
-server.port=18081
-spring.cloud.alicloud.ans.server-list=127.0.0.1
-spring.cloud.alicloud.ans.server-port=8080
-management.endpoints.web.exposure.include=*
-management.endpoint.health.show-details=always
diff --git a/spring-cloud-alibaba-examples/oss-example/pom.xml b/spring-cloud-alibaba-examples/oss-example/pom.xml
deleted file mode 100644
index 1e20ba52e8..0000000000
--- a/spring-cloud-alibaba-examples/oss-example/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
- com.alibaba.cloud
- spring-cloud-alibaba-examples
- 2.2.1.BUILD-SNAPSHOT
-
- 4.0.0
-
-
- oss-example
- jar
- Example demonstrating how to use alicloud oss
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- com.alibaba.cloud
- spring-cloud-starter-alicloud-oss
-
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
- org.apache.maven.plugins
- maven-deploy-plugin
- ${maven-deploy-plugin.version}
-
- true
-
-
-
-
-
-
diff --git a/spring-cloud-alibaba-examples/oss-example/readme-zh.md b/spring-cloud-alibaba-examples/oss-example/readme-zh.md
deleted file mode 100644
index 4385636f10..0000000000
--- a/spring-cloud-alibaba-examples/oss-example/readme-zh.md
+++ /dev/null
@@ -1,156 +0,0 @@
-# OSS Example
-
-## 项目说明
-
-如果您的应用是 Spring Cloud 应用,且需要使用阿里云的 OSS 服务进行云端的文件存储,例如电商业务中常见的商品图片存储,那么您可以使用 OSS starter 完成 Spring Cloud 应用的对象存储。
-
-阿里云对象存储服务(Object Storage Service,简称 OSS),是阿里云提供的海量、安全、低成本、高可靠的云存储服务。您可以在任何应用、任何时间、任何地点存储和访问任意类型的数据。更多 OSS 相关的信息,请参考 [OSS官网](https://www.aliyun.com/product/oss)。
-
-## 示例
-
-### 接入 OSS
-在启动示例进行演示之前,我们先了解一下如何接入 OSS。
-
-**注意:本节只是为了便于您理解接入方式,本示例代码中已经完成接入工作,您只需修改 accessKey、secretKey、endpoint 即可。**
-
-1. 修改 pom.xml 文件,引入 alicloud-oss starter。
-
-
- com.alibaba.cloud
- spring-cloud-starter-alicloud-oss
-
-
-2. 在配置文件中配置 OSS 服务对应的 accessKey、secretKey 和 endpoint。
-
- // application.properties
- spring.cloud.alicloud.access-key=your-ak
- spring.cloud.alicloud.secret-key=your-sk
- spring.cloud.alicloud.oss.endpoint=***
-
- 以阿里云 accessKey、secretKey 为例,获取方式如下。
-
- i. 在阿里云控制台界面,单击右上角头像,选择 accesskeys,或者直接登录[用户信息管理界面](https://usercenter.console.aliyun.com/):
-
- 
-
- ii. 获取 accessKey、secretKey:
-
- 
-
- **注意:**如果您使用了阿里云 [STS服务](https://help.aliyun.com/document_detail/28756.html) 进行短期访问权限管理,则除了 accessKey、secretKey、endpoint 以外,还需配置 securityToken。
-
-3. 注入 OSSClient 并进行文件上传下载等操作。
-
- @Service
- public class YourService {
- @Autowired
- private OSSClient ossClient;
-
- public void saveFile() {
- // download file to local
- ossClient.getObject(new GetObjectRequest(bucketName, objectName), new File("pathOfYourLocalFile"));
- }
- }
-
- **说明:**直接注入OSSClient 方式通常用于大量文件对象操作的场景。如果仅仅是需要读取文件对象内容,OSS Starter 也支持以 Resource 方式读取文件,详情请参考[下文](#1)。
-
-### 启动应用
-
-
-1. 在应用的 /src/main/resources/application.properties 中添加基本配置信息和 OSS 配置。
-
- spring.application.name=oss-example
- server.port=18084
- spring.cloud.alicloud.access-key=your-ak
- spring.cloud.alicloud.secret-key=your-sk
- spring.cloud.alicloud.oss.endpoint=***
-
-2. 通过 IDE 直接启动或者编译打包后启动应用。
-
- - IDE直接启动:找到主类 `OSSApplication`,执行 main 方法启动应用。
- - 打包编译后启动:
- 1. 执行 `mvn clean package` 将工程编译打包;
- 2. 执行 `java -jar oss-example.jar`启动应用。
-
-应用启动后会自动在 OSS 上创建一个名为 `spring-cloud-alibaba-test` 的 Bucket。
-
-### 上传或下载文件
-
-#### 上传文件
-使用 curl 调用上传接口 upload。该接口会上传 classpath 下的的 oss-test.json 文件。文件内容是一段 json:
-
- curl http://localhost:18084/upload
-
-显示结果:
-
- // 如果配置正确,则输出
- upload success
- // 如果上传的过程中发生异常,则会输出 upload fail: fail reason。比如accessKeyId配置错误的时候,fail reason内容如下
- upload fail: The OSS Access Key Id you provided does not exist in our records. [ErrorCode]: InvalidAccessKeyId [RequestId]: RequestId [HostId]: xxx.oss-cn-beijing.aliyuncs.com [ResponseError]: InvalidAccessKeyId The OSS Access Key Id you provided does not exist in our records. RequestId xxx.oss-cn-beijing.aliyuncs.com xxx-accessKeyId
-
-#### 下载文件
-使用 curl 调用下载接口 download。该接口会下载刚才用 upload 接口上传的 oss-test.json 文件,并打印文件内容到结果中:
-
- curl http://localhost:18084/download
-
-显示结果:
-
- // 如果配置正确,则输出
- download success, content: { "name": "oss-test" }
- // 下载的过程中如果发生异常,则会输出download fail: fail reason。比如accessKeyId配置错误,则fail reason内容如下
- download fail: The OSS Access Key Id you provided does not exist in our records. [ErrorCode]: InvalidAccessKeyId [RequestId]: RequestId [HostId]: xxx.oss-cn-beijing.aliyuncs.com [ResponseError]: InvalidAccessKeyId The OSS Access Key Id you provided does not exist in our records. RequestId sxxx.oss-cn-beijing.aliyuncs.com xxx-accessKeyId
-
-
-
-### 在 OSS 上验证结果
-
-完成文件上传或者下载操作后,可以登录 OSS 控制台进行验证。
-
-1. 登陆[OSS控制台](https://oss.console.aliyun.com/),可以看到左侧 Bucket 列表新增一个名字为`spring-cloud-alibaba-test`的 Bucket。
-
- 
-
-2. 单击`spring-cloud-alibaba-test` Bucket,选择 `文件管理` 页签,发现上传的 oss-test 文件。上传的 objectName 为`oss-test.json`。目录和文件以'/'符号分割。
-
- 
-
-
-## 查看 Endpoint 信息
-
-Spring Boot 应用支持通过 Endpoint 来暴露相关信息,OSS Starter 也支持这一点。
-
-**前提条件:**
-
-在 maven 中添加 `spring-boot-starter-actuator`依赖,并在配置中允许 Endpoints 的访问。
-
-- Spring Boot1.x 中添加配置 `management.security.enabled=false`
-- Spring Boot2.x 中添加配置 `management.endpoints.web.exposure.include=*`
-
-Spring Boot1.x 可以通过访问 http://127.0.0.1:18084/oss 来查看 OSS Endpoint 的信息。
-
-Spring Boot2.x 可以通过访问 http://127.0.0.1:18084/actuator/oss 来访问。
-
-Endpoint 内部会显示所有的 OSSClient 配置信息,以及该 OSSClient 对应的 Bucket 列表。
-
-
-
- 以 Resource 的形式读取文件
-
-OSS Starter 支持以 Resource 的形式得到文件对象。如果只需读取少量文件,您可以使用这种方式。
-
-**使用方法:**
-
-只需配置 OSS 协议对应的 Resource 即可:
-
- @Value("oss://spring-cloud-alibaba/oss-test")
- private Resource file;
-
- // 文件内容的读取
- StreamUtils.copyToString(file.getInputStream(), Charset.forName(CharEncoding.UTF_8))
-
-## 关闭 OSSClient 服务
-如果您不再需要 OSS 服务,您也无需手动关闭 OSSClient。在 ApplicationContext close 的时候,OSS Starter 会在 `OSSApplicationListener` 中调用所有 OSSClient 的 shutdown 方法。
-
-
-如果您对 Spring Cloud OSS Starter 有任何建议或想法,欢迎提交 issue 中或者通过其他社区渠道向我们反馈。
-
diff --git a/spring-cloud-alibaba-examples/oss-example/readme.md b/spring-cloud-alibaba-examples/oss-example/readme.md
deleted file mode 100644
index 76e7f8996d..0000000000
--- a/spring-cloud-alibaba-examples/oss-example/readme.md
+++ /dev/null
@@ -1,150 +0,0 @@
-# OSS Example
-## Introduction
-
-If your applications are Spring Cloud applications and you need to use Alibaba Cloud's OSS service for file storage (for example, storing commodity image for your e-commerce business), you can use OSS starter. This topic provides an example to illustrate how to use OSS starter to implement object storage for Spring Cloud applications.
-
-[Alibaba Cloud Object Storage Service (OSS)](https://www.alibabacloud.com/product/oss) is an encrypted, secure, cost-effective, and easy-to-use object storage service that enables you to store, back up, and archive large amounts of data in the cloud.
-
-
-## Demo
-
-### Connect to OSS
-
-Before we start the demo, let's learn how to connect OSS to a Spring Cloud application.
-**Note: This section is to show you how to connect to oss. The actual configurations have been completed in the following example, and you only need to specify your accessKey, secretKey and endpoint.**
-
-1. Add dependency spring-cloud-starter-alicloud-oss in the pom.xml file in your Spring Cloud project.
-
-
- com.alibaba.cloud
- spring-cloud-starter-alicloud-oss
-
-
-2. Configure accessKeyId, secretAccessKey and region in application.properties.
-
- // application.properties
- spring.cloud.alicloud.access-key=your-ak
- spring.cloud.alicloud.secret-key=your-sk
- spring.cloud.alicloud.oss.endpoint=***
-
- To get accessKey, secretKey, follow these steps:
-
- 1. On the Alibaba Cloud console, click your avatar on the upper-right corner and click accesskeys. Or visit [User Management](https://usercenter.console.aliyun.com/) page directly:
-
- 
-
- 2. Get your accessKey、secretKey:
-
- 
-
- **Note:** If you are using [STS](https://www.alibabacloud.com/help/doc-detail/28756.html), you should configure securityToken in addition to accessKey, secretKey, and endpoint.
-
-3. Inject OSSClient and use it to upload files to the OSS server and download a file from OSS server.
-
- @Service
- public class YourService {
- @Autowired
- private OSSClient ossClient;
-
- public void saveFile() {
- // download file to local
- ossClient.getObject(new GetObjectRequest(bucketName, objectName), new File("pathOfYourLocalFile"));
- }
- }
-
-**Note:** Direct injection into the OSSClient mode is typically used for scenarios where you need to handle a large number of file objects. If you only need to read the contents of the file object, OSS Starter also supports reading the file in [Resource mode](#1).
-
-### Start Application
-
-1. Add necessary configurations to file `/src/main/resources/application.properties`.
-
- spring.application.name=oss-example
- server.port=18084
- spring.cloud.alicloud.access-key=your-ak
- spring.cloud.alicloud.secret-key=your-sk
- spring.cloud.alicloud.oss.endpoint=***
-
-2. Start the application in IDE or by building a fatjar.
-
- - Start in IDE: Find main class `OSSApplication`, and execute the main method.
- - Build a fatjar:
- 1. Execute command `mvn clean package` to build a fatjar.
- 2. Run command `java -jar oss-example.jar` to start the application.
-
-After startup, a bucket called 'spring-cloud-alibaba-test' is automatically created in OSS.
-
-### Upload or download files
-
-#### Upload files
-Run `curl` command to upload files. It will upload file 'oss-test.json' in the `classpath` directory. The content of this file is JSON string:
-
- curl http://localhost:18084/upload
-
-Results:
-
- // If configurations are correct, the output will be as follows
- upload success
- // If an error occurs during uploading, the output will be 'upload fail: fail reason'. For example, if accessKeyId is wrong,the output will be
- upload fail: The OSS Access Key Id you provided does not exist in our records. [ErrorCode]: InvalidAccessKeyId [RequestId]: RequestId [HostId]: xxx.oss-cn-beijing.aliyuncs.com [ResponseError]: InvalidAccessKeyId The OSS Access Key Id you provided does not exist in our records. RequestId xxx.oss-cn-beijing.aliyuncs.com xxx-accessKeyId
-
-#### Download files
-Use `curl` command to download files. It will download the oss-test.json file that you uploaded just now and print in result:
-
- curl http://localhost:18084/download
-
-Results:
-
- // If configurations are correct, the output will be as follows
- download success, content: { "name": "oss-tes" }
- // If an error occurs during downloading, the output will be 'download fail: fail reason'. For example, if accessKeyId is wrong,fail reason will be as follows
- download fail: The OSS Access Key Id you provided does not exist in our records. [ErrorCode]: InvalidAccessKeyId [RequestId]: RequestId [HostId]: xxx.oss-cn-beijing.aliyuncs.com [ResponseError]: InvalidAccessKeyId The OSS Access Key Id you provided does not exist in our records. RequestId sxxx.oss-cn-beijing.aliyuncs.com xxx-accessKeyId
-
-
-### Verify results on OSS
-
-You can verify results on the OSS console when you finish uploading or downloading files.
-1. Log on to the [OSS console](https://oss.console.aliyun.com/),and you will find a bucket named `spring-cloud-alibaba-test`.
-
- 
-
-2. Click the `spring-cloud-alibaba-test` bucket, select the Files tab, and you will find the oss-test.json file. The objectName of the file is 'oss-test.json'. File directory and file is separated by '/'.
-
- 
-
-
-## Endpoint
-
-OSS starter also supports the implementation of Spring Boot actuator endpoints.
-
-**Prerequisite:**
-
-Add denpendency `spring-boot-starter-actuator` to your pom.xml file, and configure your endpoint security stategy.
-
-- Spring Boot1.x: Add configuration `management.security.enabled=false`
-- Spring Boot2.x: Add configuration `management.endpoints.web.exposure.include=*`
-
-To view the endpoint information, visit the following URLs:
-
-Spring Boot1.x: OSS Endpoint URL is http://127.0.0.1:18084/oss.
-
-Spring Boot2.x: OSS Endpoint URL is http://127.0.0.1:18084/actuator/oss.
-
-Endpoint will show the configurations and the list of buckets of all OSSClients.
-
-
-
-Read file using resource mode
-
-OSS Starter supports getting file objects by `Spring Resource`. Simply configure OSS protocol of the resource:
-
- @Value("oss://spring-cloud-alibaba/oss-test")
- private Resource file;
-
- // read file content
- StreamUtils.copyToString(file.getInputStream(), Charset.forName(CharEncoding.UTF_8))
-
-## Stop OSSClient service
-You do not need to manually shut down OSSClient. OSS Starter calls all OSSClient shutdown methods in the `OSSApplicationListener` during ApplicationContext close.
-
-If you have any feedback or suggestions for Spring Cloud OSS Starter, please don't hesitate to tell us by submitting github issues or via other community channels.
-
diff --git a/spring-cloud-alibaba-examples/oss-example/src/main/java/com/alibaba/cloud/examples/OssApplication.java b/spring-cloud-alibaba-examples/oss-example/src/main/java/com/alibaba/cloud/examples/OssApplication.java
deleted file mode 100644
index 678d7551ee..0000000000
--- a/spring-cloud-alibaba-examples/oss-example/src/main/java/com/alibaba/cloud/examples/OssApplication.java
+++ /dev/null
@@ -1,72 +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.examples;
-
-import java.net.URISyntaxException;
-
-import com.aliyun.oss.OSS;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.ApplicationArguments;
-import org.springframework.boot.ApplicationRunner;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.annotation.Bean;
-
-/**
- * OSS Application.
- *
- * @author Jim
- */
-@SpringBootApplication
-public class OssApplication {
-
- /**
- * Bucket Name of OSS Example.
- */
- public static final String BUCKET_NAME = "spring-cloud-alibaba-test";
-
- public static void main(String[] args) throws URISyntaxException {
- SpringApplication.run(OssApplication.class, args);
- }
-
- @Bean
- public AppRunner appRunner() {
- return new AppRunner();
- }
-
- class AppRunner implements ApplicationRunner {
-
- @Autowired
- private OSS ossClient;
-
- @Override
- public void run(ApplicationArguments args) throws Exception {
- try {
- if (!ossClient.doesBucketExist(BUCKET_NAME)) {
- ossClient.createBucket(BUCKET_NAME);
- }
- }
- catch (Exception e) {
- System.err.println("oss handle bucket error: " + e.getMessage());
- System.exit(-1);
- }
- }
-
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/oss-example/src/main/java/com/alibaba/cloud/examples/OssController.java b/spring-cloud-alibaba-examples/oss-example/src/main/java/com/alibaba/cloud/examples/OssController.java
deleted file mode 100644
index 9628f95023..0000000000
--- a/spring-cloud-alibaba-examples/oss-example/src/main/java/com/alibaba/cloud/examples/OssController.java
+++ /dev/null
@@ -1,108 +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.examples;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.charset.Charset;
-
-import com.aliyun.oss.OSS;
-import com.aliyun.oss.common.utils.IOUtils;
-import com.aliyun.oss.model.OSSObject;
-import org.apache.commons.codec.CharEncoding;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.WritableResource;
-import org.springframework.util.StreamUtils;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * OSS Controller.
- *
- * @author Jim
- */
-@RestController
-public class OssController {
-
- @Autowired
- private OSS ossClient;
-
- @Value("classpath:/oss-test.json")
- private Resource localFile;
-
- @Value("oss://" + OssApplication.BUCKET_NAME + "/oss-test.json")
- private Resource remoteFile;
-
- @GetMapping("/upload")
- public String upload() {
- try {
- ossClient.putObject(OssApplication.BUCKET_NAME, "oss-test.json", this
- .getClass().getClassLoader().getResourceAsStream("oss-test.json"));
- }
- catch (Exception e) {
- e.printStackTrace();
- return "upload fail: " + e.getMessage();
- }
- return "upload success";
- }
-
- @GetMapping("/file-resource")
- public String fileResource() {
- try {
- return "get file resource success. content: " + StreamUtils.copyToString(
- remoteFile.getInputStream(), Charset.forName(CharEncoding.UTF_8));
- }
- catch (Exception e) {
- e.printStackTrace();
- return "get resource fail: " + e.getMessage();
- }
- }
-
- @GetMapping("/download")
- public String download() {
- try {
- OSSObject ossObject = ossClient.getObject(OssApplication.BUCKET_NAME,
- "oss-test.json");
- return "download success, content: " + IOUtils
- .readStreamAsString(ossObject.getObjectContent(), CharEncoding.UTF_8);
- }
- catch (Exception e) {
- e.printStackTrace();
- return "download fail: " + e.getMessage();
- }
- }
-
- @GetMapping("/upload2")
- public String uploadWithOutputStream() {
- try {
- try (OutputStream outputStream = ((WritableResource) this.remoteFile)
- .getOutputStream();
- InputStream inputStream = localFile.getInputStream()) {
- StreamUtils.copy(inputStream, outputStream);
- }
- }
- catch (Exception ex) {
- ex.printStackTrace();
- return "upload with outputStream failed";
- }
- return "upload success";
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/oss-example/src/main/resources/application.properties b/spring-cloud-alibaba-examples/oss-example/src/main/resources/application.properties
deleted file mode 100644
index 59c650d3da..0000000000
--- a/spring-cloud-alibaba-examples/oss-example/src/main/resources/application.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-spring.application.name=oss-example
-server.port=18084
-spring.cloud.alicloud.access-key=AK
-spring.cloud.alicloud.secret-key=SK
-spring.cloud.alicloud.oss.endpoint=***.aliyuncs.com
-management.endpoints.web.exposure.include=*
diff --git a/spring-cloud-alibaba-examples/oss-example/src/main/resources/oss-test.json b/spring-cloud-alibaba-examples/oss-example/src/main/resources/oss-test.json
deleted file mode 100644
index 68682f46e4..0000000000
--- a/spring-cloud-alibaba-examples/oss-example/src/main/resources/oss-test.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "name": "oss-test"
-}
\ No newline at end of file
diff --git a/spring-cloud-alibaba-examples/pom.xml b/spring-cloud-alibaba-examples/pom.xml
index 0de5fc3dd6..7187c96e08 100644
--- a/spring-cloud-alibaba-examples/pom.xml
+++ b/spring-cloud-alibaba-examples/pom.xml
@@ -29,20 +29,13 @@
nacos-example/nacos-discovery-example
nacos-example/nacos-config-example
nacos-example/nacos-gateway-example
- oss-example
- ans-example/ans-consumer-feign-example
- ans-example/ans-consumer-ribbon-example
- ans-example/ans-provider-example
seata-example/business-service
seata-example/order-service
seata-example/storage-service
seata-example/account-service
- acm-example/acm-local-example
rocketmq-example/rocketmq-consume-example
rocketmq-example/rocketmq-produce-example
- sms-example
spring-cloud-bus-rocketmq-example
- schedulerx-example/schedulerx-simple-task-example
spring-cloud-alibaba-dubbo-examples
spring-cloud-alibaba-sidecar-examples/spring-cloud-alibaba-sidecar-nacos-example
spring-cloud-alibaba-sidecar-examples/spring-cloud-alibaba-sidecar-consul-example
diff --git a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/pom.xml b/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/pom.xml
deleted file mode 100644
index 406b3c473e..0000000000
--- a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/pom.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
- spring-cloud-alibaba-examples
- com.alibaba.cloud
- 2.2.1.BUILD-SNAPSHOT
- ../../pom.xml
-
- 4.0.0
- schedulerx-simple-task-example
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alicloud-schedulerx
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
-
\ No newline at end of file
diff --git a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/readme-zh.md b/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/readme-zh.md
deleted file mode 100644
index 91b07a2e97..0000000000
--- a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/readme-zh.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# SchedulerX Simple Task Example
-
-## 项目说明
-
-本项目展示了,在Spring Cloud体系中,如何快如接入SchedulerX,使用任务调度服务。
-
-SchedulerX 是阿里中间件团队开发的一款分布式任务调度产品。它为您提供秒级、精准、高可靠、高可用的定时(基于 Cron 表达式)任务调度服务。同时提供分布式的任务执行模型,如网格任务。网格任务支持海量子任务均匀分配到所有 Worker(schedulerx-client)上执行。
-
-## 示例
-
-### 准备工作
-
-1. 请先[注册阿里云账号](https://account.aliyun.com/register/register.htm?spm=5176.8142029.388261.26.e9396d3eEIv28g&oauth_callback=https%3A%2F%2Fwww.aliyun.com%2F)
-
-2. SchedulerX集成到了EDAS组件中心,因此需要[开通EDAS服务](https://common-buy.aliyun.com/?spm=5176.11451019.0.0.6f5965c0Uq5tue&commodityCode=edaspostpay#/buy)
-
-3. 到[EDAS组件中心](https://edas.console.aliyun.com/#/edasTools)开通SchedulerX组件,即分布式任务管理。
-
-4. 进入[SchedulerX分组管理](https://edas.console.aliyun.com/#/schedulerXGroup?regionNo=cn-test)页面,选择上方"测试"区域,点击右上角"新建分组",创建一个分组。
-
-5. 将"分组ID"的值填写到`application.properties`文件中`key`为`spring.cloud.alicloud.scx.group-id`对应的value值,即如下所示。
-
- spring.cloud.alicloud.scx.group-id=111-1-1-1111
-
-6. 进入[SchedulerX任务列表](https://edas.console.aliyun.com/#/edasSchedulerXJob?regionNo=cn-test)页面,选择上方"测试"区域,点击右上角"新建Job",创建一个Job,即如下所示。
-
- Job分组:测试——111-1-1-1111
- Job处理接口:SimpleTask
- 类型:简单Job单机版
- 定时表达式:默认选项——0 * * * * ?
- Job描述:无
- 自定义参数:无
-
-### 启动应用
-
-直接运行main class,即`ScxApplication`。
-
-### 查看效果
-
-观察应用的控制台日志输出,可以看到每一分钟会打印一次如下日志。
-
-```
- -----------Hello world---------------
-```
-
-如果您对 Spring Cloud SchedulerX Starter 有任何建议或想法,欢迎提交 issue 中或者通过其他社区渠道向我们反馈。
-
diff --git a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/java/com/alibaba/cloud/examples/HelloController.java b/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/java/com/alibaba/cloud/examples/HelloController.java
deleted file mode 100644
index 106c23d0d6..0000000000
--- a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/java/com/alibaba/cloud/examples/HelloController.java
+++ /dev/null
@@ -1,35 +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.examples;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @author xiaolongzuo
- */
-@RestController
-public class HelloController {
-
- @RequestMapping("/")
- @ResponseBody
- public String hello() {
- return "OK";
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/java/com/alibaba/cloud/examples/ScxApplication.java b/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/java/com/alibaba/cloud/examples/ScxApplication.java
deleted file mode 100644
index eac0aed112..0000000000
--- a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/java/com/alibaba/cloud/examples/ScxApplication.java
+++ /dev/null
@@ -1,32 +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.examples;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-/**
- * @author xiaolongzuo
- */
-@SpringBootApplication
-public class ScxApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(ScxApplication.class, args);
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/java/com/alibaba/cloud/examples/SimpleTask.java b/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/java/com/alibaba/cloud/examples/SimpleTask.java
deleted file mode 100644
index 720bb67c4f..0000000000
--- a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/java/com/alibaba/cloud/examples/SimpleTask.java
+++ /dev/null
@@ -1,40 +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.examples;
-
-import com.alibaba.edas.schedulerx.ProcessResult;
-import com.alibaba.edas.schedulerx.ScxSimpleJobContext;
-import com.alibaba.edas.schedulerx.ScxSimpleJobProcessor;
-
-import org.springframework.beans.factory.annotation.Autowired;
-
-/**
- * @author xiaolongzuo
- */
-public class SimpleTask implements ScxSimpleJobProcessor {
-
- @Autowired
- private TestService testService;
-
- @Override
- public ProcessResult process(ScxSimpleJobContext context) {
- testService.test();
- ProcessResult processResult = new ProcessResult(true);
- return processResult;
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/java/com/alibaba/cloud/examples/TestController.java b/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/java/com/alibaba/cloud/examples/TestController.java
deleted file mode 100644
index 7e9291ce85..0000000000
--- a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/java/com/alibaba/cloud/examples/TestController.java
+++ /dev/null
@@ -1,39 +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.examples;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @author xiaolongzuo
- */
-@RestController
-public class TestController {
-
- static AtomicInteger atomicInteger = new AtomicInteger(0);
-
- @RequestMapping("/test")
- @ResponseBody
- public String test() {
- return String.valueOf(atomicInteger.get());
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/java/com/alibaba/cloud/examples/TestService.java b/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/java/com/alibaba/cloud/examples/TestService.java
deleted file mode 100644
index 78abd79218..0000000000
--- a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/java/com/alibaba/cloud/examples/TestService.java
+++ /dev/null
@@ -1,31 +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.examples;
-
-import org.springframework.stereotype.Service;
-
-/**
- * @author xiaolongzuo
- */
-@Service
-public class TestService {
-
- public void test() {
- TestController.atomicInteger.incrementAndGet();
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/resources/application.properties b/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/resources/application.properties
deleted file mode 100644
index a995fa3fad..0000000000
--- a/spring-cloud-alibaba-examples/schedulerx-example/schedulerx-simple-task-example/src/main/resources/application.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-server.port=18033
-spring.cloud.alicloud.scx.group-id=***
-spring.cloud.alicloud.edas.namespace=cn-test
diff --git a/spring-cloud-alibaba-examples/sms-example/pom.xml b/spring-cloud-alibaba-examples/sms-example/pom.xml
deleted file mode 100644
index 252f42a91f..0000000000
--- a/spring-cloud-alibaba-examples/sms-example/pom.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
- 4.0.0
-
- sms-example
- jar
- Example demonstrating how to use alicloud sms
-
-
- spring-cloud-alibaba-examples
- com.alibaba.cloud
- 2.2.1.BUILD-SNAPSHOT
- ../pom.xml
-
-
-
- UTF-8
- UTF-8
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- com.alibaba.cloud
- spring-cloud-starter-alicloud-sms
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
- org.apache.maven.plugins
- maven-deploy-plugin
- ${maven-deploy-plugin.version}
-
- true
-
-
-
-
-
-
-
diff --git a/spring-cloud-alibaba-examples/sms-example/readme-zh.md b/spring-cloud-alibaba-examples/sms-example/readme-zh.md
deleted file mode 100644
index 6907655119..0000000000
--- a/spring-cloud-alibaba-examples/sms-example/readme-zh.md
+++ /dev/null
@@ -1,314 +0,0 @@
-# SMS Example
-
-## 项目说明
-
-如果您的应用是 Spring Cloud/Boot 应用,且需要使用阿里云的 SMS 服务来发送短信,例如登录验证码,那么您可以使用 SMS starter 完成 Spring Cloud/Boot 应用的短信发送。
-
-短信服务(Short Message Service)是阿里云为用户提供的一种通信服务的能力。支持国内和国际快速发送验证码、短信通知和推广短信,服务范围覆盖全球200多个国家和地区。更多可参考 [官网文档](https://help.aliyun.com/document_detail/60704.html?spm=5176.8195934.1283918.6.18924183bHPct2)
-
-## 示例
-
-### 接入 SMS
-
-在启动示例进行演示之前,我们先了解一下如何接入 SMS。
-
-**注意:本节只是为了便于您理解接入方式,本示例代码中已经完成接入工作,您只需修改 accessKey、secretKey 即可。**
-
-1. 修改 pom.xml 文件,引入 alicloud-sms starter。
-
- ```xml
-
- com.alibaba.cloud
- spring-cloud-starter-alicloud-sms
-
- ```
-
-1. 在配置文件中配置 SMS 服务对应的 accessKey、secretKey 。
-
- ```properties
- spring.cloud.alicloud.access-key=your-ak
- spring.cloud.alicloud.secret-key=your-sk
- ```
-
- 以阿里云 accessKey、secretKey 为例,获取方式如下。
-
- i. 在阿里云控制台界面,单击右上角头像,选择 accesskeys,或者直接登录[用户信息管理界面](https://usercenter.console.aliyun.com/):
-
- 
-
- ii. 获取 accessKey、secretKey:
-
- 
-
- **注意:**如果您使用了阿里云 [STS服务](https://help.aliyun.com/document_detail/28756.html) 进行短期访问权限管理,则除了 accessKey、secretKey 以外,还需配置 securityToken。
-
-1. 注入 ISmsService 实例并进行短信发送等操作。
-
- ```java
- @RestController
- public class SmsController {
- @Autowired
- private ISmsService smsService ;
-
- @RequestMapping("/send.do")
- public SendSmsResponse sendMessage(String telphone,String code) {
- // 组装请求对象-具体描述见控制台-文档部分内容
- SendSmsRequest request = new SendSmsRequest();
- // 必填:待发送手机号
- request.setPhoneNumbers(telphone);
- // 必填:短信签名-可在短信控制台中找到
- request.setSignName("******");
- // 必填:短信模板-可在短信控制台中找到
- request.setTemplateCode("******");
- // 可选:模板中的变量替换JSON串,如模板内容为"【企业级分布式应用服务】,您的验证码为${code}"时,此处的值为
- request.setTemplateParam("{\"code\":\"" + code + "\"}");
- SendSmsResponse sendSmsResponse ;
- try {
- sendSmsResponse = smsService.sendSmsRequest(request);
- }
- catch (ClientException e) {
- e.printStackTrace();
- sendSmsResponse = new SendSmsResponse();
- }
- return sendSmsResponse ;
- }
- }
- ```
-
- **说明:** 直接注入 ISmsService 方式即可。
-
-### 启动应用
-
-
-1. 在应用的 /src/main/resources/application.properties 中添加基本配置信息。
-
- ```properties
- spring.application.name=sms-example
- server.port=18084
- spring.cloud.alicloud.access-key=your-ak
- spring.cloud.alicloud.secret-key=your-sk
- ```
-
-2. 通过 IDE 直接启动或者编译打包后启动应用。
-
- - IDE直接启动:找到主类 `SMSApplication`,执行 main 方法启动应用。
- - 打包编译后启动:
- 1. 执行 `mvn clean package` 将工程编译打包;
- 2. 执行 `java -jar sms-example.jar`启动应用。
-
-应用启动后访问 http://localhost:18084/send.do?telphone=******&code=6580。 查看返回的 SendSmsResponse 的 json 串结果。
-
-
-### 批量短信发送
-
-参考以下的 Example ,来快速开发一个具有批量短信发送的功能。在 Controller 中或者新建一个 Controler 新增如下代码:
-
-
-```java
-@RequestMapping("/batch-sms-send.do")
-public SendBatchSmsResponse batchsendCheckCode(
- @RequestParam(name = "code") String code) {
- // 组装请求对象
- SendBatchSmsRequest request = new SendBatchSmsRequest();
- // 使用 GET 提交
- request.setMethod(MethodType.GET);
- // 必填:待发送手机号。支持JSON格式的批量调用,批量上限为100个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式
- request.setPhoneNumberJson("[\"177********\",\"130********\"]");
- // 必填:短信签名-支持不同的号码发送不同的短信签名
- request.setSignNameJson("[\"*******\",\"*******\"]");
- // 必填:短信模板-可在短信控制台中找到
- request.setTemplateCode("******");
- // 必填:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
- // 友情提示:如果JSON中需要带换行符,请参照标准的JSON协议对换行符的要求,比如短信内容中包含\r\n的情况在JSON中需要表示成\\r\\n,否则会导致JSON在服务端解析失败
- request.setTemplateParamJson(
- "[{\"code\":\"" + code + "\"},{\"code\":\"" + code + "\"}]");
- SendBatchSmsResponse sendSmsResponse ;
- try {
- sendSmsResponse = smsService
- .sendSmsBatchRequest(request);
- return sendSmsResponse;
- }
- catch (ClientException e) {
- e.printStackTrace();
- sendSmsResponse = new SendBatchSmsResponse();
- }
- return sendSmsResponse ;
-}
-```
-
-### 短信查询
-
-参考以下的 Example ,可以快速开发根据某个指定的号码查询短信历史发送状态。在 Controller 中或者新建一个 Controler 新增如下代码:
-
-```java
-/**
- *
- * 短信查询 Example
- * @param telephone
- * @return
- */
-@RequestMapping("/query.do")
-public QuerySendDetailsResponse querySendDetailsResponse(
- @RequestParam(name = "tel") String telephone) {
- // 组装请求对象
- QuerySendDetailsRequest request = new QuerySendDetailsRequest();
- // 必填-号码
- request.setPhoneNumber(telephone);
- // 必填-短信发送的日期 支持30天内记录查询(可查其中一天的发送数据),格式yyyyMMdd
- request.setSendDate("20190103");
- // 必填-页大小
- request.setPageSize(10L);
- // 必填-当前页码从1开始计数
- request.setCurrentPage(1L);
- try {
- QuerySendDetailsResponse response = smsService.querySendDetails(request);
- return response;
- }
- catch (ClientException e) {
- e.printStackTrace();
- }
-
- return new QuerySendDetailsResponse();
-}
-
-```
-
-查询成功后的返回结果如下所示:
-
- ```plain
- {
- "requestId": "0030EE65-25B1-43EE-BA90-D8FDACC45DC7",
- "code": "OK",
- "message": "OK",
- "totalCount": "3",
- "smsSendDetailDTOs": [
- {
- "phoneNum": "152********",
- "sendStatus": 3,
- "errCode": "DELIVRD",
- "templateCode": "SMS_******",
- "content": "【企业级分布式应用服务】验证码为:1080,您正在注册成为平台会员,感谢您的支持!",
- "sendDate": "2019-01-03 22:09:09",
- "receiveDate": "2019-01-03 22:09:21",
- "outId": "edasTraceId"
- },
- {
- "phoneNum": "152********",
- "sendStatus": 3,
- "errCode": "DELIVRD",
- "templateCode": "SMS_******",
- "content": "【企业级分布式应用服务】验证码为:1865,您正在注册成为平台会员,感谢您的支持!",
- "sendDate": "2019-01-03 21:13:30",
- "receiveDate": "2019-01-03 21:13:37",
- "outId": "edasTraceId"
- },
- {
- "phoneNum": "152********",
- "sendStatus": 3,
- "errCode": "DELIVRD",
- "templateCode": "SMS_*******",
- "content": "【企业级分布式应用服务】验证码为:9787,您正在注册成为平台会员,感谢您的支持!",
- "sendDate": "2019-01-03 17:19:11",
- "receiveDate": "2019-01-03 17:19:15",
- "outId": "edasTraceId"
- }
- ]
- }
- ```
-
-### 短信回执消息
-
-通过订阅 SmsReport 短信状态报告,可以获知每条短信的发送情况,了解短信是否达到终端用户的状态与相关信息。这些工作已经都被 Spring Cloud AliCloud SMS 封装在内部了。你只需要完成以下两步即可。
-
-1. 在 **application.properties** 配置文件中(也可以是 application.yaml)配置 SmsReport 的队列名称。
-
- ```properties
- spring.cloud.alicloud.sms.report-queue-name=Alicom-Queue-********-SmsReport
- ```
-
-2. 实现 SmsReportMessageListener 接口,并初始化一个 Spring Bean .
-
- ```java
- /**
- * 如果需要监听短信是否被对方成功接收,只需实现这个接口并初始化一个 Spring Bean 即可。
- */
- @Component
- public class SmsReportMessageListener
- implements SmsReportMessageListener {
-
- @Override
- public boolean dealMessage(Message message) {
- // 在这里添加你的处理逻辑
-
- //do something
-
- System.err.println(this.getClass().getName() + "; " + message.toString());
- return true;
- }
- }
- ```
-
-发送状态的回执消息如下所示:
-
-```plain
-SmsReportMessageListener; MessageID:9F3CFCE6BB3B2C8F-2-1682D84D9AD-20000000A,MessageMD5:C6AFEE0EE560BBC3380252337AC36985,RequestID:5C349CCEB8C115CCF344A3EB,MessageBody:"{"send_time":"2019-01-08 20:51:40","report_time":"2019-01-08 20:51:47","success":true,"err_msg":"用户接收成功","err_code":"DELIVERED","phone_number":"152********","sms_size":"1","biz_id":"667618746951900475^0","out_id":"edasTraceId"}",ReceiptHandle:"1-ODU4OTkzNDYwMi0xNTQ2OTUxOTM3LTItOA==",DequeueCount:"1",EnqueueTime:"Tue Jan 08 20:51:47 CST 2019",FirstDequeueTime:"Tue Jan 08 20:51:47 CST 2019",NextVisibleTime:"Tue Jan 08 20:52:17 CST 2019",Priority:"8"
-```
-
-### 上行短信消息
-
-
-通过订阅SmsUp上行短信消息,可以获知终端用户回复短信的内容。这些工作也已经被 Spring Cloud AliCloud SMS 封装好了。你只需要完成以下两步即可。
-
-1. 在 **application.properties** 配置文件中(也可以是 application.yaml)配置 SmsReport 的队列名称。
-
- ```properties
- spring.cloud.alicloud.sms.up-queue-name=Alicom-Queue-********-SmsUp
- ```
-
-1. 实现 SmsUpMessageListener 接口,并初始化一个 Spring Bean 。
-
- ```java
- /**
- * 如果发送的短信需要接收对方回复的状态消息,只需实现该接口并初始化一个 Spring Bean 即可。
- */
- @Component
- public class SmsUpMessageListener
- implements SmsUpMessageListener {
-
- @Override
- public boolean dealMessage(Message message) {
- // 在这里添加你的处理逻辑
-
- //do something
-
- System.err.println(this.getClass().getName() + "; " + message.toString());
- return true;
- }
- }
- ```
-
-短信成功恢复后,上行短信消息 SmsUpMessageListener 回调后的信息如下所示:
-
-```plain
-SmsUpMessageListener; MessageID:BF030215BA85BB41-1-1682D85425F-400000003,MessageMD5:D1AF5C2D7410EF190532CBF8E17FE2B7,RequestID:5C349CEE36AF628D2A847D50,MessageBody:"{"dest_code":"2493559","send_time":"2019-01-08 20:52:14","sign_name":"【企业级分布式应用服务】","sequence_id":568585703,"phone_number":"152********","content":"5279"}",ReceiptHandle:"1-MTcxNzk4NjkxODctMTU0Njk1MTk2NC0xLTg=",DequeueCount:"1",EnqueueTime:"Tue Jan 08 20:52:14 CST 2019",FirstDequeueTime:"Tue Jan 08 20:52:14 CST 2019",NextVisibleTime:"Tue Jan 08 20:52:44 CST 2019",Priority:"8"
-```
-
-## 查看 Endpoint 信息
-
-Spring Boot 应用支持通过 Endpoint 来暴露相关信息,SMS Starter 也支持这一点。
-
-**前提条件:**
-
-在 maven 中添加 `spring-boot-starter-actuator`依赖,并在配置中允许 Endpoints 的访问。
-
-- Spring Boot1.x 中添加配置 `management.security.enabled=false`
-- Spring Boot2.x 中添加配置 `management.endpoints.web.exposure.include=*`
-
-Spring Boot1.x 可以通过访问 http://127.0.0.1:18084/sms-info 来查看 SMS Endpoint 的信息。
-
-Spring Boot2.x 可以通过访问 http://127.0.0.1:18084/actuator/sms-info 来访问。
-
-Endpoint 内部会显示最近 20 条单个短信发送的记录和批量短信发送的记录,以及当前短信消息的配置信息(包括是**SmsReport** 还是 **SmsUp**,**队列名称**,以及对应的 **MessageListener** )。
-
-
-如果您对 Spring Cloud SMS Starter 有任何建议或想法,欢迎提交 issue 中或者通过其他社区渠道向我们反馈。
diff --git a/spring-cloud-alibaba-examples/sms-example/src/main/java/com/alibaba/cloud/example/SmsApplication.java b/spring-cloud-alibaba-examples/sms-example/src/main/java/com/alibaba/cloud/example/SmsApplication.java
deleted file mode 100644
index 16edf32e88..0000000000
--- a/spring-cloud-alibaba-examples/sms-example/src/main/java/com/alibaba/cloud/example/SmsApplication.java
+++ /dev/null
@@ -1,32 +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.example;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-/**
- *
- */
-@SpringBootApplication
-public class SmsApplication {
-
- public static void main(String[] args) throws Exception {
- SpringApplication.run(SmsApplication.class, args);
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/sms-example/src/main/java/com/alibaba/cloud/example/SmsController.java b/spring-cloud-alibaba-examples/sms-example/src/main/java/com/alibaba/cloud/example/SmsController.java
deleted file mode 100644
index 9a5556fea4..0000000000
--- a/spring-cloud-alibaba-examples/sms-example/src/main/java/com/alibaba/cloud/example/SmsController.java
+++ /dev/null
@@ -1,145 +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.example;
-
-import java.util.List;
-
-import com.alibaba.alicloud.sms.ISmsService;
-import com.aliyun.mns.model.Message;
-import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsRequest;
-import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsResponse;
-import com.aliyuncs.dysmsapi.model.v20170525.SendBatchSmsRequest;
-import com.aliyuncs.dysmsapi.model.v20170525.SendBatchSmsResponse;
-import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
-import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
-import com.aliyuncs.exceptions.ClientException;
-import com.aliyuncs.http.MethodType;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.env.Environment;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-public class SmsController {
-
- @Autowired
- private Environment environment;
-
- @Autowired
- private ISmsService smsService;
-
- @Autowired
- private SmsReportMessageListener smsReportMessageListener;
-
- @GetMapping("/report-queue.do")
- public String getSmsReportQueuename() {
-
- return environment.getProperty("spring.cloud.alicloud.sms.up-queue-name");
- }
-
- @RequestMapping("/batch-sms-send.do")
- public SendBatchSmsResponse batchsendCheckCode(
- @RequestParam(name = "code") String code) {
- // 组装请求对象
- SendBatchSmsRequest request = new SendBatchSmsRequest();
- // 使用post提交
- request.setMethod(MethodType.GET);
- // 必填:待发送手机号。支持JSON格式的批量调用,批量上限为100个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式
- request.setPhoneNumberJson("[\"177********\",\"130********\"]");
- // 必填:短信签名-支持不同的号码发送不同的短信签名
- request.setSignNameJson("[\"*******\",\"*******\"]");
- // 必填:短信模板-可在短信控制台中找到
- request.setTemplateCode("******");
- // 必填:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
- // 友情提示:如果JSON中需要带换行符,请参照标准的JSON协议对换行符的要求,比如短信内容中包含\r\n的情况在JSON中需要表示成\\r\\n,否则会导致JSON在服务端解析失败
- request.setTemplateParamJson(
- "[{\"code\":\"" + code + "\"},{\"code\":\"" + code + "\"}]");
- // 可选-上行短信扩展码(扩展码字段控制在7位或以下,无特殊需求用户请忽略此字段)
- // request.setSmsUpExtendCodeJson("[\"90997\",\"90998\"]");
- try {
- SendBatchSmsResponse sendSmsResponse = smsService
- .sendSmsBatchRequest(request);
- return sendSmsResponse;
- }
- catch (ClientException e) {
- e.printStackTrace();
- }
- return new SendBatchSmsResponse();
- }
-
- @RequestMapping("/sms-send.do")
- public SendSmsResponse sendCheckCode(@RequestParam(name = "code") String code) {
- // 组装请求对象-具体描述见控制台-文档部分内容
- SendSmsRequest request = new SendSmsRequest();
- // 必填:待发送手机号
- request.setPhoneNumbers("******");
- // 必填:短信签名-可在短信控制台中找到
- request.setSignName("******");
- // 必填:短信模板-可在短信控制台中找到
- request.setTemplateCode("******");
- // 可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
- request.setTemplateParam("{\"code\":\"" + code + "\"}");
-
- // 选填-上行短信扩展码(无特殊需求用户请忽略此字段)
- // request.setSmsUpExtendCode("90997");
-
- // 可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者
- request.setOutId("****TraceId");
- try {
- SendSmsResponse sendSmsResponse = smsService.sendSmsRequest(request);
- return sendSmsResponse;
- }
- catch (ClientException e) {
- e.printStackTrace();
- }
- return new SendSmsResponse();
- }
-
- @RequestMapping("/query.do")
- public QuerySendDetailsResponse querySendDetailsResponse(
- @RequestParam(name = "tel") String telephone) {
- // 组装请求对象
- QuerySendDetailsRequest request = new QuerySendDetailsRequest();
- // 必填-号码
- request.setPhoneNumber(telephone);
- // 必填-短信发送的日期 支持30天内记录查询(可查其中一天的发送数据),格式yyyyMMdd
- request.setSendDate("20190103");
- // 必填-页大小
- request.setPageSize(10L);
- // 必填-当前页码从1开始计数
- request.setCurrentPage(1L);
- try {
- QuerySendDetailsResponse response = smsService.querySendDetails(request);
- return response;
- }
- catch (ClientException e) {
- e.printStackTrace();
- }
-
- return new QuerySendDetailsResponse();
- }
-
- @RequestMapping("/sms-report.do")
- public List smsReport() {
-
- return smsReportMessageListener.getSmsReportMessageSet();
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/sms-example/src/main/java/com/alibaba/cloud/example/SmsReportMessageListener.java b/spring-cloud-alibaba-examples/sms-example/src/main/java/com/alibaba/cloud/example/SmsReportMessageListener.java
deleted file mode 100644
index d98554fcc2..0000000000
--- a/spring-cloud-alibaba-examples/sms-example/src/main/java/com/alibaba/cloud/example/SmsReportMessageListener.java
+++ /dev/null
@@ -1,47 +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.example;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import com.aliyun.mns.model.Message;
-
-import org.springframework.stereotype.Component;
-
-/**
- * @author 如果需要监听短信是否被对方成功接收,只需实现这个接口并初始化一个 Spring Bean 即可。
- */
-@Component
-public class SmsReportMessageListener
- implements com.alibaba.alicloud.sms.SmsReportMessageListener {
-
- private List smsReportMessageSet = new LinkedList<>();
-
- @Override
- public boolean dealMessage(Message message) {
- smsReportMessageSet.add(message);
- System.err.println(this.getClass().getName() + "; " + message.toString());
- return true;
- }
-
- public List getSmsReportMessageSet() {
-
- return smsReportMessageSet;
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/sms-example/src/main/java/com/alibaba/cloud/example/SmsUpMessageListener.java b/spring-cloud-alibaba-examples/sms-example/src/main/java/com/alibaba/cloud/example/SmsUpMessageListener.java
deleted file mode 100644
index e6cef04077..0000000000
--- a/spring-cloud-alibaba-examples/sms-example/src/main/java/com/alibaba/cloud/example/SmsUpMessageListener.java
+++ /dev/null
@@ -1,36 +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.example;
-
-import com.aliyun.mns.model.Message;
-
-import org.springframework.stereotype.Component;
-
-/**
- * @author 如果发送的短信需要接收对方回复的状态消息,只需实现该接口并初始化一个 Spring Bean 即可。
- */
-@Component
-public class SmsUpMessageListener
- implements com.alibaba.alicloud.sms.SmsUpMessageListener {
-
- @Override
- public boolean dealMessage(Message message) {
- System.err.println(this.getClass().getName() + "; " + message.toString());
- return true;
- }
-
-}
diff --git a/spring-cloud-alibaba-examples/sms-example/src/main/resources/application.properties b/spring-cloud-alibaba-examples/sms-example/src/main/resources/application.properties
deleted file mode 100644
index c5e23fc84b..0000000000
--- a/spring-cloud-alibaba-examples/sms-example/src/main/resources/application.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-spring.application.name=sca-sms-example
-server.port=9051
-# config sms
-spring.cloud.alicloud.access-key=*****
-spring.cloud.alicloud.secret-key=******
-spring.cloud.alicloud.sms.report-queue-name=*****
-spring.cloud.alicloud.sms.up-queue-name=*****
-#config endpoint
-management.endpoints.web.exposure.include=*
diff --git a/spring-cloud-starter-alibaba/spring-cloud-starter-alibaba-nacos-config/src/main/java/com/alibaba/cloud/nacos/endpoint/NacosConfigEndpointAutoConfiguration.java b/spring-cloud-starter-alibaba/spring-cloud-starter-alibaba-nacos-config/src/main/java/com/alibaba/cloud/nacos/endpoint/NacosConfigEndpointAutoConfiguration.java
index 9adf90e4e2..84bca53ac2 100644
--- a/spring-cloud-starter-alibaba/spring-cloud-starter-alibaba-nacos-config/src/main/java/com/alibaba/cloud/nacos/endpoint/NacosConfigEndpointAutoConfiguration.java
+++ b/spring-cloud-starter-alibaba/spring-cloud-starter-alibaba-nacos-config/src/main/java/com/alibaba/cloud/nacos/endpoint/NacosConfigEndpointAutoConfiguration.java
@@ -52,7 +52,8 @@ public NacosConfigEndpoint nacosConfigEndpoint() {
@Bean
@ConditionalOnMissingBean
- @ConditionalOnProperty(name = "spring.cloud.nacos.config.health.enabled", matchIfMissing = true)
+ @ConditionalOnProperty(name = "spring.cloud.nacos.config.health.enabled",
+ matchIfMissing = true)
public NacosConfigHealthIndicator nacosConfigHealthIndicator() {
return new NacosConfigHealthIndicator(nacosConfigManager.getConfigService());
}
diff --git a/spring-cloud-starter-alibaba/spring-cloud-starter-alibaba-nacos-discovery/src/main/java/com/alibaba/cloud/nacos/NacosDiscoveryProperties.java b/spring-cloud-starter-alibaba/spring-cloud-starter-alibaba-nacos-discovery/src/main/java/com/alibaba/cloud/nacos/NacosDiscoveryProperties.java
index 508823166f..5b283c9aad 100644
--- a/spring-cloud-starter-alibaba/spring-cloud-starter-alibaba-nacos-discovery/src/main/java/com/alibaba/cloud/nacos/NacosDiscoveryProperties.java
+++ b/spring-cloud-starter-alibaba/spring-cloud-starter-alibaba-nacos-discovery/src/main/java/com/alibaba/cloud/nacos/NacosDiscoveryProperties.java
@@ -547,8 +547,8 @@ public NamingMaintainService namingMaintainServiceInstance() {
private Properties getNacosProperties() {
Properties properties = new Properties();
properties.put(SERVER_ADDR, serverAddr);
- properties.put(USERNAME, Objects.toString(username,""));
- properties.put(PASSWORD, Objects.toString(password,""));
+ properties.put(USERNAME, Objects.toString(username, ""));
+ properties.put(PASSWORD, Objects.toString(password, ""));
properties.put(NAMESPACE, namespace);
properties.put(UtilAndComs.NACOS_NAMING_LOG_NAME, logName);
diff --git a/spring-cloud-starter-alibaba/spring-cloud-starter-dubbo/src/main/java/com/alibaba/cloud/dubbo/registry/AbstractSpringCloudRegistry.java b/spring-cloud-starter-alibaba/spring-cloud-starter-dubbo/src/main/java/com/alibaba/cloud/dubbo/registry/AbstractSpringCloudRegistry.java
index 998ff6cd7e..ce69c8234d 100644
--- a/spring-cloud-starter-alibaba/spring-cloud-starter-dubbo/src/main/java/com/alibaba/cloud/dubbo/registry/AbstractSpringCloudRegistry.java
+++ b/spring-cloud-starter-alibaba/spring-cloud-starter-dubbo/src/main/java/com/alibaba/cloud/dubbo/registry/AbstractSpringCloudRegistry.java
@@ -222,9 +222,11 @@ protected void subscribeDubboServiceURL(URL url, NotifyListener listener,
Collection serviceInstances = serviceInstancesFunction
.apply(serviceName);
- // issue : ReStarting a consumer and then starting a provider does not automatically discover the registration
+ // issue : ReStarting a consumer and then starting a provider does not
+ // automatically discover the registration
// fix https://github.com/alibaba/spring-cloud-alibaba/issues/753
- // Re-obtain the latest list of available metadata address here, ip or port may change.
+ // Re-obtain the latest list of available metadata address here, ip or port may
+ // change.
// by https://github.com/wangzihaogithub
dubboMetadataConfigServiceProxy.removeProxy(serviceName);
repository.removeMetadataAndInitializedService(serviceName);