pig-mesh / Oss Spring Boot Starter
兼容S3协议的通用文件存储工具类
Stars: ✭ 81
Programming Languages
java
68154 projects - #9 most used programming language
Projects that are alternatives of or similar to Oss Spring Boot Starter
Walrus
🔥 Fast, Secure and Reliable System Backup, Set up in Minutes.
Stars: ✭ 197 (+143.21%)
Mutual labels: s3, s3-storage
awesome-storage
A curated list of storage open source tools. Backups, redundancy, sharing, distribution, encryption, etc.
Stars: ✭ 324 (+300%)
Mutual labels: s3, s3-storage
terraform-aws-s3
Terraform module to create default S3 bucket with logging and encryption type specific features.
Stars: ✭ 22 (-72.84%)
Mutual labels: s3, s3-storage
Seaweedfs
SeaweedFS is a fast distributed storage system for blobs, objects, files, and data lake, for billions of files! Blob store has O(1) disk seek, cloud tiering. Filer supports Cloud Drive, cross-DC active-active replication, Kubernetes, POSIX FUSE mount, S3 API, S3 Gateway, Hadoop, WebDAV, encryption, Erasure Coding.
Stars: ✭ 13,380 (+16418.52%)
Mutual labels: s3, s3-storage
Cortx
CORTX Community Object Storage is 100% open source object storage uniquely optimized for mass capacity storage devices.
Stars: ✭ 426 (+425.93%)
Mutual labels: s3, s3-storage
Uptoc
A static file deployment tool that supports multiple platforms./ 一个支持多家云厂商的静态文件部署工具
Stars: ✭ 159 (+96.3%)
Mutual labels: s3, oss
react-native-appsync-s3
React Native app for image uploads to S3 and storing their records in Amazon DynamoDB using AWS Amplify and AppSync SDK
Stars: ✭ 18 (-77.78%)
Mutual labels: s3, s3-storage
Netease Cloud Music Community
参照网易云音乐云村做的一个小程序社区,后端技术栈为Java,SpringBoot,MySQL,Redis,前端技术栈为uni-app。欢迎吐槽。
Stars: ✭ 157 (+93.83%)
Mutual labels: spring-boot, oss
Aws.s3
Amazon Simple Storage Service (S3) API Client
Stars: ✭ 302 (+272.84%)
Mutual labels: s3, s3-storage
Less3
Less3 is an S3-compatible object storage server that runs on your laptop, servers, just about anywhere!
Stars: ✭ 16 (-80.25%)
Mutual labels: s3, s3-storage
Docker Registry Manifest Cleanup
Cleans up docker registry by removing untagged manifests from the registry
Stars: ✭ 127 (+56.79%)
Mutual labels: s3, s3-storage
Depot
Toolkit for storing files and attachments in web applications
Stars: ✭ 125 (+54.32%)
Mutual labels: s3, s3-storage
Fxshop
基于SpringBoot+SpringCloud微服务的商城项目(demo版 不可用于生产)
Stars: ✭ 82 (+1.23%)
Mutual labels: spring-boot, oss
ionic-image-upload
Ionic Plugin for Uploading Images to Amazon S3
Stars: ✭ 26 (-67.9%)
Mutual labels: s3, s3-storage
Arc
📎 Flexible file upload and attachment library for Elixir
Stars: ✭ 1,087 (+1241.98%)
Mutual labels: s3, s3-storage
oss-spring-boot-starter
兼容S3 协议的通用文件存储工具类 ,支持 兼容S3 协议的云存储
- MINIO
- 阿里云
- 华为云
- 腾讯云
- 京东云
...
spring boot starter依赖
- 方便在 web 环境下使用
oss
,已上传至 maven 仓库
<dependency>
<groupId>com.pig4cloud.plugin</groupId>
<artifactId>oss-spring-boot-starter</artifactId>
<version>0.0.4</version>
</dependency>
使用方法
配置文件
oss:
#使用云OSS 需要关闭
path-style-access: false
#对应上图 ③ 处配置
endpoint: s3-cn-east-1.qiniucs.com
# 上文创建的AK, 一定注意复制完整不要有空格
access-key: xxx
# 上文创建的SK, 一定注意复制完整不要有空格
secret-key: xxx
# 上文创建的桶名称
bucketName: pig4cloud
代码使用
@Autowired
private OssTemplate template;
/**
* 上传文件
* 文件名采用uuid,避免原始文件名中带"-"符号导致下载的时候解析出现异常
*
* @param file 资源
* @return R(bucketName, filename)
*/
@PostMapping("/upload")
public R upload(@RequestParam("file") MultipartFile file, HttpServletRequest request) {
template.putObject(CommonConstants.BUCKET_NAME, fileName, file.getInputStream());
return R.ok(resultMap);
}
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].