摘 要
现代信息存储的方式有很多,人们对信息存储的便捷性要求也越来越高。本设计主要研究和设计一个基于微服务架构的网盘系统应用。系统可以让用户通过浏览器随时管理自己的文件,它提供了如文件分类、文件上传和下载、文件夹管理、文件搜索、文件分享等功能。本系统开发基于B/S结构的,以及使用微服务架构实现。后端的微服务治理工具采用Spring cloud框架,它提供了诸如服务注册和发现、服务熔断和服务网关所需的组件。
因为开发中很多时候都需要上传和下载文件,所以想开发出一个模块,用于文件的上传和下载,自然而然也就想到了网盘,因为是个人开发,所以版本项目应该会持续迭代,优化,此外,技术栈是springboot+mybatis+jquery+bootstrap。单个微服务利用Spring boot进行构建,Spring Boot在集成了许多第三方技术情况下允许开发人员快速构建项目。该系统的文件存储服务选用了FastDFS分布式文件系统,它提供了文件上传以及文件下载的基本存储接口,缓存采用Redis集群,Redis作为内存数据库能够提供高速的缓存服务,用户信息加密方面使用了JWT技术,文件以外的数据存储在MySQL数据库,采用了持久层框架MyBatis,使用数据库连接池Druid,整个项目总体使用Maven进行构建。
关键词:网盘;网盘系统;Spring boot;bootstrap;mybatis
Abstract
There are many ways of modern information storage, and people have higher and higher requirements for the convenience of information storage.This design mainly studies and designs a network disk system application based on a microservice architecture.The system allows users to manage their files at any time through the browser and providing features such as file classification, file upload and download, folder management, file search, file sharing.This system is developed based on B / S structure and implemented using microservice architecture.The back-end micro service governance tool employs the Spring cloud framework that provides components such as service registration and discovery, service circuit breakers and service Gateways.
Because many times need to upload and download files, so you want to develop a module to upload and download files, you naturally think of the network disk, because it is personal development, so the version project should continue to iterate and optimize. In addition, the technology stack is springboot + mybatis + jquery + bootstrap.Individual microservices build using Spring boot, and Spring Boot allows developers to quickly build projects while integrating many third-party technologies.The file storage service of this system uses FastDFS distributed file system, which provides the basic storage interface for file upload and file download, cache adopts Redis cluster, Redis as a memory database can provide fast cache service, user information encryption uses JWT technology, data other than files is stored in MySQL database, adopts persistent layer framework MyBatis, using database connection pool Druid, the whole project is built using Maven.
Key words: network disk; network disk system; Spring boot; bootstrap; mybatis
目录
摘 要 1
Abstract 2
1.项目简介 3
1.1项目主要功能 4
1.2技术栈 4
1.3部署注意 4
2.数据库设计 5
2.1表结构 5
2.2ER图 7
2.3SQL插入 8
3.项目开发 9
3.1项目配置 9
3.2接口开发 10
3.3项目前端页面开发 12
3.4后端接口开发 21
3.4.1工具类 21
3.4.2restful接口(部分源码) 27
3.4.3FileService文件服务接口 31
4.项目展示 32
5.总结 35
6.更新 35