文章目录
Java Main
Work with Amazon S3 objects
Amazon S3 Examples Using the AWS SDK for Java
https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/javav2/example_code/s3/src/main/java/com/example/s3
官方代码示例
官方代码示例S3
Spring Boot 集成
集成需要的依赖 spring-cloud-starter-aws
官方Spring项目 org.springframework.cloud:spring-cloud-starter-aws
https://cloud.spring.io/spring-cloud-aws/reference/html/##using-amazon-web-services
https://cloud.spring.io/spring-cloud-aws/2.1.x/multi/multi_spring-cloud-aws.html
参考这里就够了:
Getting Started with AWS S3 and Spring Boot
GitHub 代码示例
需要注意的是S3的参数配置:
两种办法:一种是在yml里面直接写ak,sk,另一种是 ~/.aws/credentials
相见官方文档ak,sk 配置办法
cloud:
aws:
region:
static: us-west-1
stack:
auto: false
credentials:
profile-name: default
调用API的类,参考:S3Repository.java
其他参考
S3
https://s3.console.aws.amazon.com/s3/home?region=ap-southeast-1#
S3 文档
https://aws.amazon.com/cn/s3/
https://aws.amazon.com/cn/s3/developer-resources/?nc=sn&loc=6
文档
https://aws.amazon.com/cn/getting-started/
https://docs.aws.amazon.com/search/doc-search.html?searchPath=documentation&searchQuery=S3%20Java
Work with Amazon S3 objects
https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/examples-s3-objects.html
Amazon S3 Examples Using the AWS SDK for Java
https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/examples-s3.html
开发文档
https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/userguide/developing-s3.html
https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html
https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/userguide/Welcome.html
Guide
https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/userguide/Welcome.html
API
https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/API/Welcome.html
Spring Boot 集成
https://www.baeldung.com/aws-s3-java
https://github.com/eugenp/tutorials/tree/master/aws/src/main/java/com/baeldung/s3
Getting Started with AWS S3 and Spring Boot
build a custom file-sharing application
https://reflectoring.io/spring-boot-s3/
https://github.com/thombergs/code-examples/tree/master/aws/s3