1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

refactor storage module: rename storage to oss

This commit is contained in:
fangjian0423 2018-09-30 11:01:48 +08:00
parent 7c1699dcd8
commit 8702fe00ae
27 changed files with 42 additions and 42 deletions

View File

@ -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 的格式。

View File

@ -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.

View File

@ -81,7 +81,7 @@
<module>spring-cloud-alibaba-test</module>
<module>spring-cloud-starter-alibaba</module>
<module>spring-cloud-starter-alicloud</module>
<module>spring-cloud-alicloud-storage</module>
<module>spring-cloud-alicloud-oss</module>
</modules>
<dependencyManagement>

View File

@ -81,7 +81,7 @@
</dependency>
<!-- Aliyun storage dependencies -->
<!-- Aliyun OSS dependencies -->
<dependency>
<groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId>
@ -97,7 +97,7 @@
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-alicloud-storage</artifactId>
<artifactId>spring-cloud-alicloud-oss</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
@ -119,7 +119,7 @@
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-alicloud-storage</artifactId>
<artifactId>spring-cloud-starter-alicloud-oss</artifactId>
<version>${project.version}</version>
</dependency>

View File

@ -10,9 +10,9 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>storage-example</artifactId>
<artifactId>oss-example</artifactId>
<packaging>jar</packaging>
<description>Example demonstrating how to use alicloud storage</description>
<description>Example demonstrating how to use alicloud oss</description>
<dependencies>
@ -22,7 +22,7 @@
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-alicloud-storage</artifactId>
<artifactId>spring-cloud-starter-alicloud-oss</artifactId>
</dependency>
<dependency>

View File

@ -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。
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-alicloud-storage</artifactId>
<artifactId>spring-cloud-starter-alicloud-oss</artifactId>
</dependency>
2. 在配置文件中配置 OSS 服务对应的 accessKeyId、secretAccessKey 和 region。

View File

@ -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.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-alicloud-storage</artifactId>
<artifactId>spring-cloud-starter-alicloud-oss</artifactId>
</dependency>
2. Configure accessKeyId, secretAccessKey and region in application.properties.

View File

@ -22,7 +22,7 @@
<module>sentinel-example/sentinel-dubbo-example/sentinel-dubbo-api</module>
<module>nacos-example/nacos-discovery-example</module>
<module>nacos-example/nacos-config-example</module>
<module>storage-example</module>
<module>oss-example</module>
</modules>
<build>

View File

@ -10,8 +10,8 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-alicloud-storage</artifactId>
<name>Spring Cloud Alibaba Cloud Storage</name>
<artifactId>spring-cloud-alicloud-oss</artifactId>
<name>Spring Cloud Alibaba Cloud OSS</name>
<dependencies>

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.cloud.alibaba.storage;
package org.springframework.cloud.alibaba.oss;
import java.util.Map;

View File

@ -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;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.cloud.alibaba.storage;
package org.springframework.cloud.alibaba.oss;
/**
* OSS constants

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -11,6 +11,6 @@
<name>Spring Cloud Alibaba Cloud Starters</name>
<description>Spring Cloud Alibaba Cloud Starters</description>
<modules>
<module>spring-cloud-starter-alicloud-storage</module>
<module>spring-cloud-starter-alicloud-oss</module>
</modules>
</project>

View File

@ -7,13 +7,13 @@
<artifactId>spring-cloud-starter-alicloud</artifactId>
<version>0.2.0.BUILD-SNAPSHOT</version>
</parent>
<artifactId>spring-cloud-starter-alicloud-storage</artifactId>
<name>Spring Cloud Starter Alibaba Cloud Storage</name>
<artifactId>spring-cloud-starter-alicloud-oss</artifactId>
<name>Spring Cloud Starter Alibaba Cloud OSS</name>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-alicloud-storage</artifactId>
<artifactId>spring-cloud-alicloud-oss</artifactId>
</dependency>
<dependency>
<groupId>com.aliyun.oss</groupId>