mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
rename alibaba storage to alicloud storage
This commit is contained in:
parent
e42225fbcc
commit
b0011bf328
@ -15,7 +15,7 @@ Spring Cloud Alibaba 致力于提供分布式应用服务开发的一站式解
|
||||
**Nacos**
|
||||
阿里巴巴开源产品,一个更易于构建云原生应用的动态服务发现、配置管理和服务管理平台。
|
||||
|
||||
**Aliyun OSS**
|
||||
**AliCloud OSS**
|
||||
阿里云对象存储服务(Object Storage Service,简称 OSS),是阿里云提供的海量、安全、低成本、高可靠的云存储服务。您可以在任何应用、任何时间、任何地点存储和访问任意类型的数据。
|
||||
|
||||
## 即将加入的组件
|
||||
|
4
pom.xml
4
pom.xml
@ -74,12 +74,14 @@
|
||||
<modules>
|
||||
<module>spring-cloud-alibaba-dependencies</module>
|
||||
<module>spring-cloud-alibaba-sentinel</module>
|
||||
<module>spring-cloud-alibaba-storage</module>
|
||||
|
||||
<module>spring-cloud-alibaba-nacos-config</module>
|
||||
<module>spring-cloud-alibaba-nacos-discovery</module>
|
||||
<module>spring-cloud-alibaba-examples</module>
|
||||
<module>spring-cloud-alibaba-test</module>
|
||||
<module>spring-cloud-starter-alibaba</module>
|
||||
<module>spring-cloud-starter-alicloud</module>
|
||||
<module>spring-cloud-alicloud-storage</module>
|
||||
</modules>
|
||||
|
||||
<dependencyManagement>
|
||||
|
@ -97,7 +97,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-storage</artifactId>
|
||||
<artifactId>spring-cloud-alicloud-storage</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@ -119,7 +119,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-storage</artifactId>
|
||||
<artifactId>spring-cloud-starter-alicloud-storage</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
<artifactId>storage-example</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<description>Example demonstrating how to use storage</description>
|
||||
<description>Example demonstrating how to use alicloud storage</description>
|
||||
|
||||
|
||||
<dependencies>
|
||||
@ -22,7 +22,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-storage</artifactId>
|
||||
<artifactId>spring-cloud-starter-alicloud-storage</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -13,11 +13,11 @@
|
||||
|
||||
**注意:本节只是为了便于您理解接入方式,本示例代码中已经完成接入工作,您只需修改 accessKeyId、secretAccessKey、region 即可。**
|
||||
|
||||
1. 修改 pom.xml 文件,引入 alibaba-storage starter。
|
||||
1. 修改 pom.xml 文件,引入 alicloud-storage starter。
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-storage</artifactId>
|
||||
<artifactId>spring-cloud-starter-alicloud-storage</artifactId>
|
||||
</dependency>
|
||||
|
||||
2. 在配置文件中配置 OSS 服务对应的 accessKeyId、secretAccessKey 和 region。
|
||||
|
@ -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-alibaba-storage in the pom.xml file in your Spring Cloud project.
|
||||
1. Add dependency spring-cloud-starter-alicloud-storage in the pom.xml file in your Spring Cloud project.
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-storage</artifactId>
|
||||
<artifactId>spring-cloud-starter-alicloud-storage</artifactId>
|
||||
</dependency>
|
||||
|
||||
2. Configure accessKeyId, secretAccessKey and region in application.properties.
|
||||
|
@ -50,7 +50,7 @@ public class NacosDiscoveryClient implements DiscoveryClient {
|
||||
public List<ServiceInstance> getInstances(String serviceId) {
|
||||
try {
|
||||
NamingService namingService = nacosRegistration.getNacosNamingService();
|
||||
List<Instance> instances = namingService.selectInstances(serviceId, true);
|
||||
List<Instance> instances = namingService.getAllInstances(serviceId);
|
||||
return hostToServiceInstanceList(instances, serviceId);
|
||||
}
|
||||
catch (Exception e) {
|
||||
@ -79,7 +79,9 @@ public class NacosDiscoveryClient implements DiscoveryClient {
|
||||
List<Instance> instances, String serviceId) {
|
||||
List<ServiceInstance> result = new ArrayList<ServiceInstance>(instances.size());
|
||||
for (Instance instance : instances) {
|
||||
result.add(hostToServiceInstance(instance, serviceId));
|
||||
if(instance.isHealthy()) {
|
||||
result.add(hostToServiceInstance(instance, serviceId));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -10,8 +10,8 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-storage</artifactId>
|
||||
<name>Spring Cloud Alibaba Storage Autoconfigure</name>
|
||||
<artifactId>spring-cloud-alicloud-storage</artifactId>
|
||||
<name>Spring Cloud Alibaba Cloud Storage</name>
|
||||
|
||||
<dependencies>
|
||||
|
@ -14,6 +14,5 @@
|
||||
<module>spring-cloud-starter-alibaba-nacos-config</module>
|
||||
<module>spring-cloud-starter-alibaba-nacos-discovery</module>
|
||||
<module>spring-cloud-starter-alibaba-sentinel</module>
|
||||
<module>spring-cloud-starter-alibaba-storage</module>
|
||||
</modules>
|
||||
</project>
|
16
spring-cloud-starter-alicloud/pom.xml
Normal file
16
spring-cloud-starter-alicloud/pom.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba</artifactId>
|
||||
<version>0.2.0.BUILD-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-starter-alicloud</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Spring Cloud Alibaba Cloud Starters</name>
|
||||
<description>Spring Cloud Alibaba Cloud Starters</description>
|
||||
<modules>
|
||||
<module>spring-cloud-starter-alicloud-storage</module>
|
||||
</modules>
|
||||
</project>
|
@ -4,16 +4,16 @@
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba</artifactId>
|
||||
<artifactId>spring-cloud-starter-alicloud</artifactId>
|
||||
<version>0.2.0.BUILD-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-starter-alibaba-storage</artifactId>
|
||||
<name>Spring Cloud Starter Alibaba Storage</name>
|
||||
<artifactId>spring-cloud-starter-alicloud-storage</artifactId>
|
||||
<name>Spring Cloud Starter Alibaba Cloud Storage</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-storage</artifactId>
|
||||
<artifactId>spring-cloud-alicloud-storage</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
Loading…
x
Reference in New Issue
Block a user