OSS控制台
1. 可手动创建Bucket
2. 控制台直接上传文件
SpringBoot集成OSS
学习路径:https://help.aliyun.com/learn/learningpath/oss.html
Java SDK:https://help.aliyun.com/document_detail/32008.html
1. 创建AccessKey
2. pom.xml中配置依赖
<!--阿里云oss-->
<dependency>
<groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId>
<version>3.10.2</version>
</dependency>
<!--日期工具栏-->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.10.1</version>
</dependency>
3. application配置文件
#服务端口
server.port=8082
#服务名
spring.application.name=service-oss
#环境设置:dev、test、prod
spring.profiles.active=dev
#阿里云 OSS
#不同的服务器,地址不同
aliyun.oss.file.endpoint=your endpoint
aliyun.oss.file.keyid=your accessKeyId
aliyun.oss.file.keysecret=your accessKeySecret
#bucket可以在控制台创建&#x