From 8702fe00ae192629cbb1feea778f6e2547856b49 Mon Sep 17 00:00:00 2001 From: fangjian0423 Date: Sun, 30 Sep 2018 11:01:48 +0800 Subject: [PATCH] refactor storage module: rename storage to oss --- README-zh.md | 2 +- README.md | 2 +- pom.xml | 2 +- spring-cloud-alibaba-dependencies/pom.xml | 6 +++--- .../{storage-example => oss-example}/pom.xml | 6 +++--- .../{storage-example => oss-example}/readme-zh.md | 6 +++--- .../{storage-example => oss-example}/readme.md | 6 +++--- .../cloud/alibaba/cloud/examples/OSSApplication.java | 0 .../cloud/alibaba/cloud/examples/OSSController.java | 0 .../src/main/resources/application.properties | 0 .../src/main/resources/oss-test.json | 0 spring-cloud-alibaba-examples/pom.xml | 2 +- .../pom.xml | 4 ++-- .../cloud/alibaba/oss}/OSSApplicationListener.java | 2 +- .../cloud/alibaba/oss}/OSSAutoConfiguration.java | 4 ++-- .../springframework/cloud/alibaba/oss}/OSSConstants.java | 2 +- .../springframework/cloud/alibaba/oss}/OSSProperties.java | 2 +- .../cloud/alibaba/oss}/endpoint/OSSEndpoint.java | 2 +- .../alibaba/oss}/endpoint/OSSEndpointAutoConfiguration.java | 2 +- .../alibaba/oss}/resource/OSSStorageProtocolResolver.java | 2 +- .../cloud/alibaba/oss}/resource/OSSStorageResource.java | 2 +- .../src/main/resources/META-INF/spring.factories | 5 +++++ .../cloud/alibaba/oss}/test/OSSAutoConfigurationTests.java | 6 +++--- .../oss}/test/OSSMultiClientAutoConfigurationTests.java | 6 +++--- .../src/main/resources/META-INF/spring.factories | 5 ----- spring-cloud-starter-alicloud/pom.xml | 2 +- .../pom.xml | 6 +++--- 27 files changed, 42 insertions(+), 42 deletions(-) rename spring-cloud-alibaba-examples/{storage-example => oss-example}/pom.xml (88%) rename spring-cloud-alibaba-examples/{storage-example => oss-example}/readme-zh.md (98%) rename spring-cloud-alibaba-examples/{storage-example => oss-example}/readme.md (97%) rename spring-cloud-alibaba-examples/{storage-example => oss-example}/src/main/java/org/springframework/cloud/alibaba/cloud/examples/OSSApplication.java (100%) rename spring-cloud-alibaba-examples/{storage-example => oss-example}/src/main/java/org/springframework/cloud/alibaba/cloud/examples/OSSController.java (100%) rename spring-cloud-alibaba-examples/{storage-example => oss-example}/src/main/resources/application.properties (100%) rename spring-cloud-alibaba-examples/{storage-example => oss-example}/src/main/resources/oss-test.json (100%) rename {spring-cloud-alicloud-storage => spring-cloud-alicloud-oss}/pom.xml (94%) rename {spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage => spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss}/OSSApplicationListener.java (96%) rename {spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage => spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss}/OSSAutoConfiguration.java (93%) rename {spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage => spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss}/OSSConstants.java (94%) rename {spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage => spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss}/OSSProperties.java (98%) rename {spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage => spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss}/endpoint/OSSEndpoint.java (97%) rename {spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage => spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss}/endpoint/OSSEndpointAutoConfiguration.java (95%) rename {spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage => spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss}/resource/OSSStorageProtocolResolver.java (97%) rename {spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage => spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss}/resource/OSSStorageResource.java (98%) create mode 100644 spring-cloud-alicloud-oss/src/main/resources/META-INF/spring.factories rename {spring-cloud-alicloud-storage/src/test/java/org/springframework/cloud/alibaba/storage => spring-cloud-alicloud-oss/src/test/java/org/springframework/cloud/alibaba/oss}/test/OSSAutoConfigurationTests.java (93%) rename {spring-cloud-alicloud-storage/src/test/java/org/springframework/cloud/alibaba/storage => spring-cloud-alicloud-oss/src/test/java/org/springframework/cloud/alibaba/oss}/test/OSSMultiClientAutoConfigurationTests.java (95%) delete mode 100644 spring-cloud-alicloud-storage/src/main/resources/META-INF/spring.factories rename spring-cloud-starter-alicloud/{spring-cloud-starter-alicloud-storage => spring-cloud-starter-alicloud-oss}/pom.xml (79%) diff --git a/README-zh.md b/README-zh.md index 32b4098f1..54a9cfa12 100644 --- a/README-zh.md +++ b/README-zh.md @@ -48,7 +48,7 @@ Example 列表: [Nacos Discovery Example](https://github.com/spring-cloud-incubator/spring-cloud-alibaba/blob/master/spring-cloud-alibaba-examples/nacos-example/nacos-discovery-example/readme-zh.md) -[AliCloud OSS Example](https://github.com/spring-cloud-incubator/spring-cloud-alibaba/blob/master/spring-cloud-alibaba-examples/storage-example/readme-zh.md) +[AliCloud OSS Example](https://github.com/spring-cloud-incubator/spring-cloud-alibaba/blob/master/spring-cloud-alibaba-examples/oss-example/readme-zh.md) ## 版本管理规范 项目的版本号格式为 x.x.x 的形式,其中 x 的数值类型为数字,从0开始取值,且不限于 0~9 这个范围。项目处于孵化器阶段时,第一位版本号固定使用0,即版本号为 0.x.x 的格式。 diff --git a/README.md b/README.md index 0811db0af..c0941db39 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Examples: [Nacos Discovery Example](https://github.com/spring-cloud-incubator/spring-cloud-alibaba/blob/master/spring-cloud-alibaba-examples/nacos-example/nacos-discovery-example/readme.md) -[AliCloud OSS Example](https://github.com/spring-cloud-incubator/spring-cloud-alibaba/blob/master/spring-cloud-alibaba-examples/storage-example/readme.md) +[AliCloud OSS Example](https://github.com/spring-cloud-incubator/spring-cloud-alibaba/blob/master/spring-cloud-alibaba-examples/oss-example/readme.md) ## Version control guidelines The version number of the project is in the form of x.x.x, where x is a number, starting from 0, and is not limited to the range 0~9. When the project is in the incubator phase, the first version number is fixed to 0, that is, the version number is 0.x.x. diff --git a/pom.xml b/pom.xml index f0f49e1d9..a8388a1ec 100644 --- a/pom.xml +++ b/pom.xml @@ -81,7 +81,7 @@ spring-cloud-alibaba-test spring-cloud-starter-alibaba spring-cloud-starter-alicloud - spring-cloud-alicloud-storage + spring-cloud-alicloud-oss diff --git a/spring-cloud-alibaba-dependencies/pom.xml b/spring-cloud-alibaba-dependencies/pom.xml index 3f32646a3..88568164d 100644 --- a/spring-cloud-alibaba-dependencies/pom.xml +++ b/spring-cloud-alibaba-dependencies/pom.xml @@ -81,7 +81,7 @@ - + com.aliyun.oss aliyun-sdk-oss @@ -97,7 +97,7 @@ org.springframework.cloud - spring-cloud-alicloud-storage + spring-cloud-alicloud-oss ${project.version} @@ -119,7 +119,7 @@ org.springframework.cloud - spring-cloud-starter-alicloud-storage + spring-cloud-starter-alicloud-oss ${project.version} diff --git a/spring-cloud-alibaba-examples/storage-example/pom.xml b/spring-cloud-alibaba-examples/oss-example/pom.xml similarity index 88% rename from spring-cloud-alibaba-examples/storage-example/pom.xml rename to spring-cloud-alibaba-examples/oss-example/pom.xml index c42de657d..cfa08a115 100644 --- a/spring-cloud-alibaba-examples/storage-example/pom.xml +++ b/spring-cloud-alibaba-examples/oss-example/pom.xml @@ -10,9 +10,9 @@ 4.0.0 - storage-example + oss-example jar - Example demonstrating how to use alicloud storage + Example demonstrating how to use alicloud oss @@ -22,7 +22,7 @@ org.springframework.cloud - spring-cloud-starter-alicloud-storage + spring-cloud-starter-alicloud-oss diff --git a/spring-cloud-alibaba-examples/storage-example/readme-zh.md b/spring-cloud-alibaba-examples/oss-example/readme-zh.md similarity index 98% rename from spring-cloud-alibaba-examples/storage-example/readme-zh.md rename to spring-cloud-alibaba-examples/oss-example/readme-zh.md index e287c761b..56ac5cb68 100644 --- a/spring-cloud-alibaba-examples/storage-example/readme-zh.md +++ b/spring-cloud-alibaba-examples/oss-example/readme-zh.md @@ -1,4 +1,4 @@ -# Storage Example +# OSS Example ## 项目说明 @@ -13,11 +13,11 @@ **注意:本节只是为了便于您理解接入方式,本示例代码中已经完成接入工作,您只需修改 accessKeyId、secretAccessKey、region 即可。** -1. 修改 pom.xml 文件,引入 alicloud-storage starter。 +1. 修改 pom.xml 文件,引入 alicloud-oss starter。 org.springframework.cloud - spring-cloud-starter-alicloud-storage + spring-cloud-starter-alicloud-oss 2. 在配置文件中配置 OSS 服务对应的 accessKeyId、secretAccessKey 和 region。 diff --git a/spring-cloud-alibaba-examples/storage-example/readme.md b/spring-cloud-alibaba-examples/oss-example/readme.md similarity index 97% rename from spring-cloud-alibaba-examples/storage-example/readme.md rename to spring-cloud-alibaba-examples/oss-example/readme.md index 394ad207f..17dfbbdc3 100644 --- a/spring-cloud-alibaba-examples/storage-example/readme.md +++ b/spring-cloud-alibaba-examples/oss-example/readme.md @@ -1,4 +1,4 @@ -# Storage Example +# 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. @@ -13,11 +13,11 @@ If your applications are Spring Cloud applications and you need to use Alibaba C 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 accessKeyId, secretAccessKey and region.** -1. Add dependency spring-cloud-starter-alicloud-storage in the pom.xml file in your Spring Cloud project. +1. Add dependency spring-cloud-starter-alicloud-oss in the pom.xml file in your Spring Cloud project. org.springframework.cloud - spring-cloud-starter-alicloud-storage + spring-cloud-starter-alicloud-oss 2. Configure accessKeyId, secretAccessKey and region in application.properties. diff --git a/spring-cloud-alibaba-examples/storage-example/src/main/java/org/springframework/cloud/alibaba/cloud/examples/OSSApplication.java b/spring-cloud-alibaba-examples/oss-example/src/main/java/org/springframework/cloud/alibaba/cloud/examples/OSSApplication.java similarity index 100% rename from spring-cloud-alibaba-examples/storage-example/src/main/java/org/springframework/cloud/alibaba/cloud/examples/OSSApplication.java rename to spring-cloud-alibaba-examples/oss-example/src/main/java/org/springframework/cloud/alibaba/cloud/examples/OSSApplication.java diff --git a/spring-cloud-alibaba-examples/storage-example/src/main/java/org/springframework/cloud/alibaba/cloud/examples/OSSController.java b/spring-cloud-alibaba-examples/oss-example/src/main/java/org/springframework/cloud/alibaba/cloud/examples/OSSController.java similarity index 100% rename from spring-cloud-alibaba-examples/storage-example/src/main/java/org/springframework/cloud/alibaba/cloud/examples/OSSController.java rename to spring-cloud-alibaba-examples/oss-example/src/main/java/org/springframework/cloud/alibaba/cloud/examples/OSSController.java diff --git a/spring-cloud-alibaba-examples/storage-example/src/main/resources/application.properties b/spring-cloud-alibaba-examples/oss-example/src/main/resources/application.properties similarity index 100% rename from spring-cloud-alibaba-examples/storage-example/src/main/resources/application.properties rename to spring-cloud-alibaba-examples/oss-example/src/main/resources/application.properties diff --git a/spring-cloud-alibaba-examples/storage-example/src/main/resources/oss-test.json b/spring-cloud-alibaba-examples/oss-example/src/main/resources/oss-test.json similarity index 100% rename from spring-cloud-alibaba-examples/storage-example/src/main/resources/oss-test.json rename to spring-cloud-alibaba-examples/oss-example/src/main/resources/oss-test.json diff --git a/spring-cloud-alibaba-examples/pom.xml b/spring-cloud-alibaba-examples/pom.xml index e4c9fa155..ed4acb014 100644 --- a/spring-cloud-alibaba-examples/pom.xml +++ b/spring-cloud-alibaba-examples/pom.xml @@ -22,7 +22,7 @@ sentinel-example/sentinel-dubbo-example/sentinel-dubbo-api nacos-example/nacos-discovery-example nacos-example/nacos-config-example - storage-example + oss-example diff --git a/spring-cloud-alicloud-storage/pom.xml b/spring-cloud-alicloud-oss/pom.xml similarity index 94% rename from spring-cloud-alicloud-storage/pom.xml rename to spring-cloud-alicloud-oss/pom.xml index 8a7ede088..d486d2c02 100644 --- a/spring-cloud-alicloud-storage/pom.xml +++ b/spring-cloud-alicloud-oss/pom.xml @@ -10,8 +10,8 @@ 4.0.0 org.springframework.cloud - spring-cloud-alicloud-storage - Spring Cloud Alibaba Cloud Storage + spring-cloud-alicloud-oss + Spring Cloud Alibaba Cloud OSS diff --git a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/OSSApplicationListener.java b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/OSSApplicationListener.java similarity index 96% rename from spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/OSSApplicationListener.java rename to spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/OSSApplicationListener.java index e5e56de7d..d29039b04 100644 --- a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/OSSApplicationListener.java +++ b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/OSSApplicationListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cloud.alibaba.storage; +package org.springframework.cloud.alibaba.oss; import java.util.Map; diff --git a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/OSSAutoConfiguration.java b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/OSSAutoConfiguration.java similarity index 93% rename from spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/OSSAutoConfiguration.java rename to spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/OSSAutoConfiguration.java index 9ab78b03f..194933c35 100644 --- a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/OSSAutoConfiguration.java +++ b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/OSSAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cloud.alibaba.storage; +package org.springframework.cloud.alibaba.oss; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -22,7 +22,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.cloud.alibaba.storage.resource.OSSStorageProtocolResolver; +import org.springframework.cloud.alibaba.oss.resource.OSSStorageProtocolResolver; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/OSSConstants.java b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/OSSConstants.java similarity index 94% rename from spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/OSSConstants.java rename to spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/OSSConstants.java index 7bf76938d..4f0587923 100644 --- a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/OSSConstants.java +++ b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/OSSConstants.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cloud.alibaba.storage; +package org.springframework.cloud.alibaba.oss; /** * OSS constants diff --git a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/OSSProperties.java b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/OSSProperties.java similarity index 98% rename from spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/OSSProperties.java rename to spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/OSSProperties.java index cd39077ef..323c1754a 100644 --- a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/OSSProperties.java +++ b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/OSSProperties.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cloud.alibaba.storage; +package org.springframework.cloud.alibaba.oss; import java.util.Arrays; import java.util.HashMap; diff --git a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/endpoint/OSSEndpoint.java b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/endpoint/OSSEndpoint.java similarity index 97% rename from spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/endpoint/OSSEndpoint.java rename to spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/endpoint/OSSEndpoint.java index 02a89b588..d417a858a 100644 --- a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/endpoint/OSSEndpoint.java +++ b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/endpoint/OSSEndpoint.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cloud.alibaba.storage.endpoint; +package org.springframework.cloud.alibaba.oss.endpoint; import java.util.ArrayList; import java.util.HashMap; diff --git a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/endpoint/OSSEndpointAutoConfiguration.java b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/endpoint/OSSEndpointAutoConfiguration.java similarity index 95% rename from spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/endpoint/OSSEndpointAutoConfiguration.java rename to spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/endpoint/OSSEndpointAutoConfiguration.java index e764d2c4b..c056d5864 100644 --- a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/endpoint/OSSEndpointAutoConfiguration.java +++ b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/endpoint/OSSEndpointAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cloud.alibaba.storage.endpoint; +package org.springframework.cloud.alibaba.oss.endpoint; import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnEnabledEndpoint; import org.springframework.boot.actuate.endpoint.annotation.Endpoint; diff --git a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/resource/OSSStorageProtocolResolver.java b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/resource/OSSStorageProtocolResolver.java similarity index 97% rename from spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/resource/OSSStorageProtocolResolver.java rename to spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/resource/OSSStorageProtocolResolver.java index bd46ee0b5..159f2c49e 100644 --- a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/resource/OSSStorageProtocolResolver.java +++ b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/resource/OSSStorageProtocolResolver.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cloud.alibaba.storage.resource; +package org.springframework.cloud.alibaba.oss.resource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/resource/OSSStorageResource.java b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/resource/OSSStorageResource.java similarity index 98% rename from spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/resource/OSSStorageResource.java rename to spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/resource/OSSStorageResource.java index 30f48b235..08ef10aa8 100644 --- a/spring-cloud-alicloud-storage/src/main/java/org/springframework/cloud/alibaba/storage/resource/OSSStorageResource.java +++ b/spring-cloud-alicloud-oss/src/main/java/org/springframework/cloud/alibaba/oss/resource/OSSStorageResource.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cloud.alibaba.storage.resource; +package org.springframework.cloud.alibaba.oss.resource; import java.io.File; import java.io.FileNotFoundException; diff --git a/spring-cloud-alicloud-oss/src/main/resources/META-INF/spring.factories b/spring-cloud-alicloud-oss/src/main/resources/META-INF/spring.factories new file mode 100644 index 000000000..4f71c2da2 --- /dev/null +++ b/spring-cloud-alicloud-oss/src/main/resources/META-INF/spring.factories @@ -0,0 +1,5 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.springframework.cloud.alibaba.oss.OSSAutoConfiguration,\ +org.springframework.cloud.alibaba.oss.endpoint.OSSEndpointAutoConfiguration +org.springframework.context.ApplicationListener=\ +org.springframework.cloud.alibaba.oss.OSSApplicationListener \ No newline at end of file diff --git a/spring-cloud-alicloud-storage/src/test/java/org/springframework/cloud/alibaba/storage/test/OSSAutoConfigurationTests.java b/spring-cloud-alicloud-oss/src/test/java/org/springframework/cloud/alibaba/oss/test/OSSAutoConfigurationTests.java similarity index 93% rename from spring-cloud-alicloud-storage/src/test/java/org/springframework/cloud/alibaba/storage/test/OSSAutoConfigurationTests.java rename to spring-cloud-alicloud-oss/src/test/java/org/springframework/cloud/alibaba/oss/test/OSSAutoConfigurationTests.java index a87e0af1f..96a145535 100644 --- a/spring-cloud-alicloud-storage/src/test/java/org/springframework/cloud/alibaba/storage/test/OSSAutoConfigurationTests.java +++ b/spring-cloud-alicloud-oss/src/test/java/org/springframework/cloud/alibaba/oss/test/OSSAutoConfigurationTests.java @@ -14,15 +14,15 @@ * limitations under the License. */ -package org.springframework.cloud.alibaba.storage.test; +package org.springframework.cloud.alibaba.oss.test; import static org.assertj.core.api.Assertions.assertThat; import org.junit.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.test.context.runner.ApplicationContextRunner; -import org.springframework.cloud.alibaba.storage.OSSAutoConfiguration; -import org.springframework.cloud.alibaba.storage.OSSProperties; +import org.springframework.cloud.alibaba.oss.OSSAutoConfiguration; +import org.springframework.cloud.alibaba.oss.OSSProperties; import com.aliyun.oss.OSS; import com.aliyun.oss.OSSClient; diff --git a/spring-cloud-alicloud-storage/src/test/java/org/springframework/cloud/alibaba/storage/test/OSSMultiClientAutoConfigurationTests.java b/spring-cloud-alicloud-oss/src/test/java/org/springframework/cloud/alibaba/oss/test/OSSMultiClientAutoConfigurationTests.java similarity index 95% rename from spring-cloud-alicloud-storage/src/test/java/org/springframework/cloud/alibaba/storage/test/OSSMultiClientAutoConfigurationTests.java rename to spring-cloud-alicloud-oss/src/test/java/org/springframework/cloud/alibaba/oss/test/OSSMultiClientAutoConfigurationTests.java index b0caf0196..1af1f2853 100644 --- a/spring-cloud-alicloud-storage/src/test/java/org/springframework/cloud/alibaba/storage/test/OSSMultiClientAutoConfigurationTests.java +++ b/spring-cloud-alicloud-oss/src/test/java/org/springframework/cloud/alibaba/oss/test/OSSMultiClientAutoConfigurationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cloud.alibaba.storage.test; +package org.springframework.cloud.alibaba.oss.test; import static org.assertj.core.api.Assertions.assertThat; @@ -23,8 +23,8 @@ import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.test.context.runner.ApplicationContextRunner; -import org.springframework.cloud.alibaba.storage.OSSAutoConfiguration; -import org.springframework.cloud.alibaba.storage.OSSProperties; +import org.springframework.cloud.alibaba.oss.OSSAutoConfiguration; +import org.springframework.cloud.alibaba.oss.OSSProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-cloud-alicloud-storage/src/main/resources/META-INF/spring.factories b/spring-cloud-alicloud-storage/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 9945ef830..000000000 --- a/spring-cloud-alicloud-storage/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,5 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ -org.springframework.cloud.alibaba.storage.OSSAutoConfiguration,\ -org.springframework.cloud.alibaba.storage.endpoint.OSSEndpointAutoConfiguration -org.springframework.context.ApplicationListener=\ -org.springframework.cloud.alibaba.storage.OSSApplicationListener \ No newline at end of file diff --git a/spring-cloud-starter-alicloud/pom.xml b/spring-cloud-starter-alicloud/pom.xml index 499687416..f44393a4c 100644 --- a/spring-cloud-starter-alicloud/pom.xml +++ b/spring-cloud-starter-alicloud/pom.xml @@ -11,6 +11,6 @@ Spring Cloud Alibaba Cloud Starters Spring Cloud Alibaba Cloud Starters - spring-cloud-starter-alicloud-storage + spring-cloud-starter-alicloud-oss \ No newline at end of file diff --git a/spring-cloud-starter-alicloud/spring-cloud-starter-alicloud-storage/pom.xml b/spring-cloud-starter-alicloud/spring-cloud-starter-alicloud-oss/pom.xml similarity index 79% rename from spring-cloud-starter-alicloud/spring-cloud-starter-alicloud-storage/pom.xml rename to spring-cloud-starter-alicloud/spring-cloud-starter-alicloud-oss/pom.xml index 6e7a31788..e52d22728 100644 --- a/spring-cloud-starter-alicloud/spring-cloud-starter-alicloud-storage/pom.xml +++ b/spring-cloud-starter-alicloud/spring-cloud-starter-alicloud-oss/pom.xml @@ -7,13 +7,13 @@ spring-cloud-starter-alicloud 0.2.0.BUILD-SNAPSHOT - spring-cloud-starter-alicloud-storage - Spring Cloud Starter Alibaba Cloud Storage + spring-cloud-starter-alicloud-oss + Spring Cloud Starter Alibaba Cloud OSS org.springframework.cloud - spring-cloud-alicloud-storage + spring-cloud-alicloud-oss com.aliyun.oss