This is a demo of uploading files to AWS S3 using Java SpringBoot.
First, we need to add the dependency of AWS S3:
1 2 3 4 5 |
<dependency> <groupId>com.amazonaws</groupId> <artifactId>aws-java-sdk-s3</artifactId> <version>1.11.891</version> </dependency> |
Then add these configs in application.yml:
1 2 3 4 5 6 |
custom: aws: access-key: CHOBITACCESSKEY secret-key: CHOBIT/THISIS006SECRET007Key/dotORG bucket: zhyea endpoint: www.zhyea.com:80 |
The accessKey
, secretKey
and bucket
is nesscessary which can be found in aws’ admin dashboard. Continue reading