https://github.com/linux-china/spring-boot-starter-oss
Spring Boot Start with Aliyun OSS
https://github.com/linux-china/spring-boot-starter-oss
Last synced: 8 months ago
JSON representation
Spring Boot Start with Aliyun OSS
- Host: GitHub
- URL: https://github.com/linux-china/spring-boot-starter-oss
- Owner: linux-china
- Created: 2015-02-14T11:01:43.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-05-04T07:13:15.000Z (about 10 years ago)
- Last Synced: 2025-10-13T00:09:32.091Z (9 months ago)
- Language: Java
- Size: 41 KB
- Stars: 20
- Watchers: 2
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
spring-boot-start-oss
===================================
Spring boot with aliyun oss support
### usage
in pom.xml add following dependency:
org.mvnsearch.boot
spring-boot-starter-oss
1.0.0-SNAPSHOT
in application.properties file, please add following keys:
spring.oss.key=xxxx
spring.oss.secret=yyyy
spring.oss.bucket=xxx-dev
in your code you can use OssClient directly:
@Autowired
OSSClient ossClient;
you can use FileStorageService API to operate file:
@Autowired
FileStorageService fileStorageService;
### Spring XML Configuration
If you want to setup bean in Spring xml file, please use following code:
### spring-boot-start-oss service List
* org.mvnsearch.boot.oss.FileStorageService: API to operate the file
* com.aliyun.oss.OSSClient: aliyun OSSClient
Please use FileStorageService as usual, not OSSClient.
### Aliyun OSS endpoint
Please visit http://localhost:8080/oss to view detail information.
### FaQ
* Please upload a "ok.txt" under your buket for health indicator.