diff --git a/pom.xml b/pom.xml
index 41490ef68..9d639946f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -74,6 +74,8 @@
spring-cloud-alibaba-dependenciesspring-cloud-alibaba-sentinel-autoconfigurespring-cloud-starter-sentinel
+ spring-cloud-alibaba-storage-autoconfigure
+ spring-cloud-starter-storagespring-cloud-alibaba-examples
diff --git a/spring-cloud-alibaba-dependencies/pom.xml b/spring-cloud-alibaba-dependencies/pom.xml
index bd1bb5db1..1f7223bb3 100644
--- a/spring-cloud-alibaba-dependencies/pom.xml
+++ b/spring-cloud-alibaba-dependencies/pom.xml
@@ -17,6 +17,7 @@
0.1.1
+ 3.1.0
@@ -53,6 +54,11 @@
sentinel-dubbo-adapter${sentinel.version}
+
+ com.aliyun.oss
+ aliyun-sdk-oss
+ ${oss.version}
+
@@ -61,6 +67,11 @@
spring-cloud-alibaba-sentinel-autoconfigure${project.version}
+
+ org.springframework.cloud
+ spring-cloud-alibaba-storage-autoconfigure
+ ${project.version}
+
@@ -68,6 +79,11 @@
spring-cloud-starter-sentinel${project.version}
+
+ org.springframework.cloud
+ spring-cloud-starter-storage
+ ${project.version}
+
diff --git a/spring-cloud-alibaba-storage-autoconfigure/pom.xml b/spring-cloud-alibaba-storage-autoconfigure/pom.xml
new file mode 100644
index 000000000..e97369974
--- /dev/null
+++ b/spring-cloud-alibaba-storage-autoconfigure/pom.xml
@@ -0,0 +1,67 @@
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-alibaba
+ 0.1.0.BUILD-SNAPSHOT
+
+ 4.0.0
+
+ org.springframework.cloud
+ spring-cloud-alibaba-storage-autoconfigure
+ Spring Cloud Alibaba Storage Autoconfigure
+
+
+
+
+ com.aliyun.oss
+ aliyun-sdk-oss
+ true
+
+
+
+ org.springframework.boot
+ spring-boot-actuator
+ provided
+ true
+
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ provided
+ true
+
+
+
+ org.springframework.boot
+ spring-boot
+ provided
+ true
+
+
+
+ org.springframework.boot
+ spring-boot-autoconfigure
+ provided
+ true
+
+
+
+ org.springframework.boot
+ spring-boot-starter-logging
+ provided
+ true
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-cloud-alibaba-storage-autoconfigure/src/main/java/org/springframework/cloud/alibaba/storage/OSSApplicationListener.java b/spring-cloud-alibaba-storage-autoconfigure/src/main/java/org/springframework/cloud/alibaba/storage/OSSApplicationListener.java
new file mode 100644
index 000000000..ff1a6c1fd
--- /dev/null
+++ b/spring-cloud-alibaba-storage-autoconfigure/src/main/java/org/springframework/cloud/alibaba/storage/OSSApplicationListener.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 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
+ *
+ * http://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 org.springframework.cloud.alibaba.storage;
+
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.ApplicationListener;
+import org.springframework.context.event.ContextClosedEvent;
+
+import com.aliyun.oss.OSS;
+
+/**
+ * Shutdown All OSS Clients when {@code ApplicationContext} gets closed {@link ApplicationListener}
+ *
+ * @author Jim
+ */
+public class OSSApplicationListener implements ApplicationListener {
+
+ private static final Logger logger = LoggerFactory
+ .getLogger(OSSApplicationListener.class);
+
+ @Override
+ public void onApplicationEvent(ContextClosedEvent event) {
+ Map ossClientMap = event.getApplicationContext()
+ .getBeansOfType(OSS.class);
+ logger.info("{} OSSClients will be shutdown soon", ossClientMap.size());
+ for(String beanName : ossClientMap.keySet()) {
+ logger.info("shutdown ossClient: {}", beanName);
+ ossClientMap.get(beanName).shutdown();
+ }
+ }
+}
\ No newline at end of file
diff --git a/spring-cloud-alibaba-storage-autoconfigure/src/main/java/org/springframework/cloud/alibaba/storage/OSSAutoConfiguration.java b/spring-cloud-alibaba-storage-autoconfigure/src/main/java/org/springframework/cloud/alibaba/storage/OSSAutoConfiguration.java
new file mode 100644
index 000000000..799d32a97
--- /dev/null
+++ b/spring-cloud-alibaba-storage-autoconfigure/src/main/java/org/springframework/cloud/alibaba/storage/OSSAutoConfiguration.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 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
+ *
+ * http://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 org.springframework.cloud.alibaba.storage;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+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.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import com.aliyun.oss.OSS;
+import com.aliyun.oss.OSSClientBuilder;
+
+/**
+ * OSS Auto {@link Configuration}
+ *
+ * @author Jim
+ */
+@Configuration
+@ConditionalOnClass(OSS.class)
+@ConditionalOnProperty(name = OSSConstants.ENABLED, havingValue = "true", matchIfMissing = true)
+@EnableConfigurationProperties(OSSProperties.class)
+public class OSSAutoConfiguration {
+
+ private static final Logger logger = LoggerFactory
+ .getLogger(OSSAutoConfiguration.class);
+
+ @ConditionalOnMissingBean
+ @Bean
+ public OSS ossClient(OSSProperties ossProperties) {
+ logger.info("construct OSS because it is missing");
+ return new OSSClientBuilder().build(ossProperties.getEndpoint(),
+ ossProperties.getAccessKeyId(), ossProperties.getSecretAccessKey(),
+ ossProperties.getSecurityToken(), ossProperties.getConfiguration());
+ }
+
+ @ConditionalOnMissingBean
+ @Bean
+ public OSSStorageProtocolResolver ossStorageProtocolResolver() {
+ return new OSSStorageProtocolResolver();
+ }
+
+}
\ No newline at end of file
diff --git a/spring-cloud-alibaba-storage-autoconfigure/src/main/java/org/springframework/cloud/alibaba/storage/OSSConstants.java b/spring-cloud-alibaba-storage-autoconfigure/src/main/java/org/springframework/cloud/alibaba/storage/OSSConstants.java
new file mode 100644
index 000000000..e7e29df8c
--- /dev/null
+++ b/spring-cloud-alibaba-storage-autoconfigure/src/main/java/org/springframework/cloud/alibaba/storage/OSSConstants.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 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
+ *
+ * http://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 org.springframework.cloud.alibaba.storage;
+
+/**
+ * OSS constants
+ *
+ * @author Jim
+ */
+public interface OSSConstants {
+
+ String PREFIX = "spring.cloud.alibaba.oss";
+ String ENABLED = PREFIX + ".enabled";
+
+}
\ No newline at end of file
diff --git a/spring-cloud-alibaba-storage-autoconfigure/src/main/java/org/springframework/cloud/alibaba/storage/OSSProperties.java b/spring-cloud-alibaba-storage-autoconfigure/src/main/java/org/springframework/cloud/alibaba/storage/OSSProperties.java
new file mode 100644
index 000000000..c0278ece5
--- /dev/null
+++ b/spring-cloud-alibaba-storage-autoconfigure/src/main/java/org/springframework/cloud/alibaba/storage/OSSProperties.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 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
+ *
+ * http://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 org.springframework.cloud.alibaba.storage;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+import com.aliyun.oss.ClientBuilderConfiguration;
+
+/**
+ * {@link ConfigurationProperties} for configuring OSS.
+ *
+ * @author Jim
+ */
+@ConfigurationProperties(prefix = OSSConstants.PREFIX)
+public class OSSProperties {
+
+ private static final Logger logger = LoggerFactory.getLogger(OSSProperties.class);
+
+ public static final Map endpointMap = new HashMap<>();
+
+ static {
+ endpointMap.put("cn-beijing", "http://oss-cn-beijing.aliyuncs.com");
+ endpointMap.put("cn-qingdao", "http://oss-cn-qingdao.aliyuncs.com");
+ endpointMap.put("cn-hangzhou", "http://oss-cn-hangzhou.aliyuncs.com");
+ endpointMap.put("cn-hongkong", "http://oss-cn-hongkong.aliyuncs.com");
+ endpointMap.put("cn-shenzhen", "http://oss-cn-shenzhen.aliyuncs.com");
+ endpointMap.put("us-west-1", "http://oss-us-west-1.aliyuncs.com");
+ endpointMap.put("ap-southeast-1", "http://oss-ap-southeast-1.aliyuncs.com");
+ }
+
+ private ClientBuilderConfiguration configuration;
+
+ private String accessKeyId;
+
+ private String secretAccessKey;
+
+ private String region;
+
+ private String endpoint;
+
+ // support ram sts
+ private String securityToken;
+
+ public ClientBuilderConfiguration getConfiguration() {
+ return configuration;
+ }
+
+ public void setConfiguration(ClientBuilderConfiguration configuration) {
+ this.configuration = configuration;
+ }
+
+ public String getAccessKeyId() {
+ return accessKeyId;
+ }
+
+ public void setAccessKeyId(String accessKeyId) {
+ this.accessKeyId = accessKeyId;
+ }
+
+ public String getSecretAccessKey() {
+ return secretAccessKey;
+ }
+
+ public void setSecretAccessKey(String secretAccessKey) {
+ this.secretAccessKey = secretAccessKey;
+ }
+
+ public String getEndpoint() {
+ return endpoint;
+ }
+
+ public void setEndpoint(String endpoint) {
+ this.endpoint = endpoint;
+ }
+
+ public String getSecurityToken() {
+ return securityToken;
+ }
+
+ public void setSecurityToken(String securityToken) {
+ this.securityToken = securityToken;
+ }
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ if (!endpointMap.containsKey(region)) {
+ String errorStr = "error region: " + region + ", please choose from "
+ + Arrays.toString(endpointMap.keySet().toArray());
+ logger.error(errorStr);
+ throw new IllegalArgumentException(errorStr);
+ }
+ this.region = region;
+ this.setEndpoint(endpointMap.get(region));
+ }
+}
\ No newline at end of file
diff --git a/spring-cloud-alibaba-storage-autoconfigure/src/main/java/org/springframework/cloud/alibaba/storage/endpoint/OSSEndpoint.java b/spring-cloud-alibaba-storage-autoconfigure/src/main/java/org/springframework/cloud/alibaba/storage/endpoint/OSSEndpoint.java
new file mode 100644
index 000000000..bbf77f1aa
--- /dev/null
+++ b/spring-cloud-alibaba-storage-autoconfigure/src/main/java/org/springframework/cloud/alibaba/storage/endpoint/OSSEndpoint.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 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
+ *
+ * http://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 org.springframework.cloud.alibaba.storage.endpoint;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.actuate.endpoint.AbstractEndpoint;
+import org.springframework.context.ApplicationContext;
+
+import com.aliyun.oss.OSSClient;
+
+/**
+ * Actuator Endpoint to expose OSS Meta Data
+ *
+ * @author Jim
+ */
+public class OSSEndpoint extends AbstractEndpoint