Coder Social home page Coder Social logo

filesystem's Introduction

前几天搞了一个文件管理系统,因为几乎做每一个项目都涉及到上传文件这一步骤,不可能每一个项目都做一个模块处理文件,所以我最近整了一个小文件系统来用,这样子别的项目上传文件的话,直接可以上传到该项目即可。。。 详情请浏览博客 https://blog.csdn.net/JinglongSource/article/details/88544115

目前支持多端文件上传, 默认使用本地磁盘存储

整体效果,如下:

项目结构

在这里插入图片描述

首页效果

在这里插入图片描述

日志查看在这里插入图片描述

(1)解决了什么问题?

  • 简化其他项目的文件处理(上传 | 下载)问题,统一处理
  • 个人的小云盘,并且可以提供外链访问下载等

这个文件系统主要功能其中包括上传文件下载文件在线观看删除文件文件检索访问监控防盗链等 其中文件是存储在七牛云服务器上的,简要介绍一下,七牛云有10G的对象存储空间可以使用,永久的,支持http,不提供https流量,所以这也是我撘文件系统的原因之一,就是为了小程序的https....否则小程序无法访问图片

防盗链效果

在这里插入图片描述 but 对于爬虫来说无任何阻碍【捂脸】

(2)用到的技术栈

  • 前端
    • freemarker
    • bootstrap
    • bootstrap-table
    • jquery
  • 后台
    • springboot 2.1.3.RELEASE
    • spring-data-jpa 2.1.3.RELEASE
    • mysql 5.7
  • 搭建
    • tomcat 9.0.1 (or 7.0)
    • maven 3.5.4
  • 其他依赖
    • qiniu[7.2.0, 7.2.99]
    • fastjson 1.2.54

(3)未来的期望

暂时的话不想继续完善了,先实习然后学习一段时间先,基本功能差不多,继续添加的功能的话,就是为了用技术而作了,等有时间了会考虑继续迭代吧

  • 多用户(用户管理)
  • 文件管理(文件签名)
  • 权限控制(spring security)
  • 分布式文件存储(hadoop HDFS):正在学习中...

(4)哪里下载

导入注意事项:

  1. sql文件

    修改 application.properties

    spring.jpa.hibernate.ddl-auto=create-drop # 自动创建表
  2. 修改数据库

    spring.datasource.url=jdbc:mysql://localhost/{database}?characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
  3. 修改 application.properties本地存储的路径

    # 设置文件处理这, 支持多个, 使用英文逗号分隔。如 DiskFileHelper,QiNiuFileHelper
    handle.file.helper=DiskFileHelper
    # 本地存储的路径
    disk.file.path=C:/Users/houyu/Desktop/temp
  4. 七牛云配置 前往七牛云官网注册账号,并且获取绑定好域名,如果不绑定,七牛云提供一个月的免费域名,一个月后失效,建议绑定自己的,前往对象存储创建Bucket,并且获取accessKey secretKey domainOfBucket在util.QiniuUtil.java文件中修改对应的配置即可。

    private static final String accessKey = "your accessKey";
    private static final String secretKey = "your secretKey";
    private static final String bucket = "your bucket";
    private static final Configuration cfg = new Configuration(Zone.zone0());
    private static final String domainOfBucket = "your domainOfBucket";
交流

博客同步到SHY BLOG mail :[email protected]

filesystem's People

Contributors

houyusource avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.