SpringBoot 2.x 纯手工打造私人网盘项目

不是太高的手 2020-10-13 05:11:21
简介

基于 SpringBoot2.x + elFinder 搭建的私有云盘服务,功能堪比某度网盘,丰富的界面化操作,提供了各种API实现,最主要的是还可以自己定制开发相关功能,是一款不可多得的文件管理利器。

环境搭建

软件 版本 功能 地址
SpringBoot 2.2.6 全能框架 https://spring.io/projects/spring-boot/
elFinder 2.1.38 文件管理 https://studio-42.github.io/elFinder/

文件管理

文件以及文件夹新增,删除,移动,重名
在线打包文件
文件下载、上传
在线预览文件,图片
在线处理图片,文件
配置

配置参数:

# ===================================
# 网盘
# ===================================
file-manager.command = com.tools.common.elfinder.command
file-manager.thumbnail.width=80
file-manager.volumes[0].Node=
file-manager.volumes[0].source=fileSystem
file-manager.volumes[0].alias=file
file-manager.volumes[0].path=D://cloudFile
file-manager.volumes[0].isDefault=true
file-manager.volumes[0].locale=
file-manager.volumes[0].constraint.locked=false
file-manager.volumes[0].constraint.readable=true
file-manager.volumes[0].constraint.writable=true
映射配置:

@Component
@Data
@ConfigurationProperties(prefix="file-manager")
public class ElfinderConfiguration {

private Thumbnail thumbnail;

private String command;

private List<Node> volumes = new ArrayList<>();

private Long maxUploadSize = -1L;

}
预览
https://gitee.com/52itstyle/SPTools


小结

之前整合过 SpringBoot1.x 的版本的网盘项目,不过 SpringBoot2.x 稍微有点变化,做了一点点处理,后续会跟进更多功能,比如多用户文件管理、文件预览鉴权等等一系列功能。
源码

网盘地址:https://gitee.com/52itstyle/SPTools,使用Git拉取,然后切换到网盘版分支即可体验。

...全文
6434 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
wycfight 2020-11-11
  • 打赏
  • 举报
回复
厉害 学习了
街头小贩 2020-10-17
  • 打赏
  • 举报
回复
我也建议改进一下样式, 看着不是很理想,参考一下白渡或别的网盘界面设计。不要试图去教育用户
街头小贩 2020-10-17
  • 打赏
  • 举报
回复
KeepSayingNo 2020-10-17
  • 打赏
  • 举报
回复
支持支持,mark一下
qybao 2020-10-14
  • 打赏
  • 举报
回复
支持开源,有时间看看
tianfang 2020-10-14
  • 打赏
  • 举报
回复
支持一下,也给你个建议,学习nextcloud,增加功能
staton_ 2020-10-14
  • 打赏
  • 举报
回复
支持支持,mark一下

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧