1 Star 1 Fork 65

PlusBoy / 图书管理系统后台Vue2-SpringBoot2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

☀️新手必读

☀️技术栈介绍

☃️前端主要技术栈

技术 作用 版本
Vue 提供前端交互 2.6.14
Vue-Router 路由式编程导航 3.5.1
Element-UI 模块组件库,绘制界面 2.4.5
Axios 发送ajax请求给后端请求数据 1.2.1
core-js 兼容性更强,浏览器适配 3.8.3
swiper 轮播图插件(快速实现) 3.4.2
vue-baberrage vue弹幕插件(实现留言功能) 3.2.4
vue-json-excel 表格导出Excel 0.3.0
html2canvas+jspdf 表格导出PDF 1.4.1 2.5.1
node-polyfill-webpack-plugin webpack5中移除了nodejs核心模块的polyfill自动引入 2.0.1
default-passive-events Chrome 增加了新的事件捕获机制 Passive Event Listeners(被动事件侦听器) 让页面滑动更加流畅,主要用于提升移动端滑动行为的性能
nprogress 发送请求显示进度条(人机交互友好) 0.2.0
echarts 数据转图标的好工具(功能强大) 5.4.1
less lessloader 方便样式开发 4.1.3 11.1.0

☃️后端主要技术栈

技术及版本 作用 版本
SpringBoot 应用开发框架 2.7.8
JDK Java 开发包 1.8
MySQL 提供后端数据库 8.0.23
MyBatisPlus 提供连接数据库和快捷的增删改查 3.5.1
SpringBoot-Configuration-processor 配置处理器 定义的类和配置文件绑定一般没有提示,因此可以添加配置处理器,产生相对应的提示.
SpringBoot-Starter-Web 后端集成Tomcat MVC 用于和前端连接
SpringBoot-starter-test Junit4单元测试前端在调用接口前,后端先调用单元测试进行增删改查,注意Junit4和5的问题,注解@RunWith是否添加
Lombok 实体类方法的快速生成 简化代码
mybatis-plus-generator 代码生成器 3.5.1
MyBatisX MyBatisPlus插件直接生成mapper,实体类,service
jjwt token工具包 0.9.0
fastjson 阿里巴巴的json对象转化工具 1.2.83
hutool hutool工具包(简化开发工具类) 文档

☀️项目简介

  • 主要使用Vue2和SpringBoot2实现

  • 项目权限控制分别为:用户借阅,图书管理员,系统管理员

  • 开发工具:IDEA2022.1.3(真不推荐用eclipse开发,IDEA项目可以导出为eclipse项目,二者不影响,但需要自己学教程)

  • IDEA->Eclipse

  • Eclipse->IDEA

  • 学校老师硬性要求软件的话,还是按要求来。可以先问一下是否可以选择其他软件开发。

  • 用户账号密码: 相思断红肠 123456

  • 图书管理员账号密码: admin 123456

  • 系统管理员账号密码: root 123456

  • 前端样式参考 感谢原作者明月复苏

  • 遇到交互功能错误,或者页面无法打开,请用开发者工具F12查看请求和响应状态码情况,当然可能小白不懂,那也没关系,可以加我QQ:909088445。白天上课,晚上有空才能回答,感谢体谅!⭐⭐⭐

☀️项目详细介绍(亮点)

  • 本项目采用前后端分离的模式,前端构建页面,后端作数据接口,前端调用后端数据接口得到数据,重新渲染页面。
  • 后端已开启CORS跨域支持
  • API认证使用Token认证
  • 前端在Authorization字段提供token令牌
  • 使用HTTP Status Code表示状态
  • 数据返回格式使用JSON
  • 后端采用权限拦截器进行权限校验,并检查登录情况
  • 添加全局异常处理机制,捕获异常,增强系统健壮性
  • 前端用Echarts展示借阅量,文字和图片结合
  • 留言组件采用弹幕形式,贴合用户的喜好。

⭐用户模块功能介绍

img

  • 图书查询功能:分页构造器缓解数据过大压力,后端可设置请求数防止爬虫请求数过大,服务器负载过大。模糊查询进行字段搜索。表格均可导出PDF和EXCEL。

  • 读者规则功能:查询现有的借阅规则,借阅规则包括:借阅编号,可借阅图书数量,可借阅天数,可借阅图书馆,过期扣费/天。

  • 查看公告: 可以查询图书管理员发布的公告列表,文字滑动⭐

  • 个人信息: 可以查看个人的借阅证编号,借阅证姓名,规则编号,状态,可以修改个人账户的密码。

  • 借阅信息: 可以查看自身借阅过的图书记录和归还情况

  • 违章信息: 可以查询自身归还的图书是否有违章信息

  • 读者留言: 实现留言功能并以弹幕形式显示

⭐图书管理员模块功能介绍

image-20230311151434774

  • 借阅图书: 图书管理员输入借阅证号(用户)和要借的图书编号和当前的时间,点击借阅。

  • 归还图书: 输入图书编号查看图书是否逾期,并且可以设置违规信息,然后选择是否归还图书

  • 借书报表: 用于查询已经借阅并归还的书籍列表,同样使用分页构造器和模糊查询字段,显示借阅证编号,图书编号,借阅日期,截止日期,归还日期,违章信息,处理人。

  • 还书报表: 用于查询已经借阅但是还未归还的书籍列表,显示借阅证编号,图书编号,借阅日期,截止日期。

  • 发布公告: 可以查询当前发布的公告列表,并进行删除,修改,增加功能,分页构造器用于缓解数据量大的情况。

⭐系统管理员模块功能介绍

image-20230311151453931

  • 书籍管理: 可以查询当前的所有图书,显示图书编号,图书昵称,作者,图书馆,分类,位置,状态,描述。可以进行添加,修改,删除图书。利用分页构造器实现批量查询。利用模糊查询实现图书搜索功能。利用插件实现PDF和EXCEL导出。
  • 书籍类型: 显示查询当前的所有图书类型,可以进行添加,修改,删除图书类型,利用分页构造器实现批量查询,缓解数据压力。
  • 借阅证管理: 可以查询当前的所有借阅证列表,也就是用户数量,可以进行添加,修改,删除操作。同样实现分页。
  • 借阅信息查询: 可以查询当前已经完成借阅和归还的记录,显示借阅证号,书籍编号,借阅日期,截止日期,归还日期,违章信息,处理人。分页功能,PDF和EXCEL导出。
  • 借阅规则管理: 可以查询当前所有的借阅规则,显示限制借阅天数,限制本数,限制图书馆,逾期费用,可以进行添加、删除、修改操作。
  • 图书管理员管理: 显示当前的图书管理员列表,显示账号,姓名,邮箱,可以进行添加、删除、修改操作。
  • 系统管理: 可以查询一个月内的借阅量,以一周为时间间隔,计算借阅量,用Echarts实现折线图的展示。

☀️数据库表设计

t_users表

列名 数据类型以及长度 备注
user_id int(11) 主键 非空 自增 用户表的唯一标识
username varchar(32) 用户名 非空
password varchar(32) 密码(MD5加密) 非空
card_name varchar(10) 真实姓名 非空
card_number Bigint(11) 借阅证编号 固定 11位随机生成 非空(后文都改BigInt)
rule_number int(11) 规则编号 可以自定义 也就是权限功能
status int(1) 1表示可用 0表示禁用
create_time datetime 创建时间 Java注解 JsonFormatter
update_time datetime 更新时间 Java注解 JsonFormatter

t_admins表

列名 数据类型以及长度 备注
admin_id int(11) 主键 非空 自增 管理员表的唯一标识
username varchar(32) 用户名 非空
password varchar(32) 密码(MD5加密) 非空
admin_name varchar(10) 管理员真实姓名 非空
status int(1) 1表示可用 0表示禁用
create_time datetime 创建时间 Java注解 JsonFormatter
update_time datetime 更新时间 Java注解 JsonFormatter

t_book_admins表

列名 数据类型以及长度 备注
book_admin_id int(11) 主键 非空 自增 管理表的唯一标识
username varchar(32) 用户名 非空
password varchar(32) 密码(MD5加密)非空
book_admin_name varchar(10) 图书管理员真实姓名 非空
status int(1) 1表示可用 0表示禁用
email varchar(255) 电子邮箱
create_time datetime 创建时间 Java注解 JsonFormatter
update_time datetime 更新时间 Java注解 JsonFormatter

t_books表

列名 数据类型以及长度 备注
book_id int(11) 主键 自增 非空 图书表的唯一标识
book_number int(11) 图书编号 非空 图书的唯一标识
book_name varchar(32) 图书名称 非空
book_author varchar(32) 图书作者 非空
book_library varchar(32) 图书所在图书馆的名称 非空
book_type varchar(32) 图书类别 非空
book_location varchar(32) 图书位置 非空
book_status varchar(32) 图书状态(未借出/已借出)
book_description varchar(100) 图书描述
create_time datetime 创建时间 Java注解 JsonFormatter
update_time datetime 更新时间 Java注解 JsonFormatter

t_books_borrow表

列名 数据类型以及长度 备注
borrow_id int(11) 主键 自增 非空 借阅表的唯一标识
card_number int(11) 借阅证编号 固定 11位随机生成 非空 用户与图书关联的的唯一标识
book_number int(11) 图书编号 非空 图书的唯一标识
borrow_date datetime 借阅日期 Java注解 JsonFormatter
close_date datetime 截止日期 Java注解 JsonFormatter
return_date datetime 归还日期 Java注解 JsonFormatter
create_time datetime 创建时间 Java注解 JsonFormatter
update_time datetime 更新时间 Java注解 JsonFormatter

t_notice表

列名 数据类型以及长度 备注
notice_id int(11) 主键 非空 自增 公告表记录的唯一标识
notice_title varchar(32) 公告的题目 非空
notice_content varchar(255) 公告的内容 非空
notice_admin_id int(11) 发布公告的管理员的id
create_time datetime 创建时间 Java注解 JsonFormatter
update_time datetime 更新时间 Java注解 JsonFormatter

t_violation表

列名 数据类型以及长度 备注
violation_id int(11) 主键 非空 自增 违章表记录的唯一标识
card_number int(11) 借阅证编号 固定 11位随机生成 非空
book_number int(11) 图书编号 非空 图书的唯一标识
borrow_date datetime 借阅日期 Java注解 JsonFormatter
close_date datetime 截止日期 Java注解 JsonFormatter
return_date datetime 归还日期 Java注解 JsonFormatter
violation_message varchar(100) 违章信息 非空
violation_admin_id int(11) 违章信息管理员的id
create_time datetime 创建时间 Java注解 JsonFormatter
update_time datetime 更新时间 Java注解 JsonFormatter

t_comment表

列名 数据类型以及长度 备注
comment_id int(11) 主键 非空 自增 留言表记录的唯一标识
comment_avatar varchar(255) 留言的头像
comment_barrage_style varchar(32) 弹幕的高度
comment_message varchar(255) 留言的内容
comment_time int(11) 留言的时间(控制速度)
create_time datetime 创建时间 Java注解 JsonFormatter
update_time datetime 更新时间 Java注解 JsonFormatter

t_book_rule表

列名 数据类型以及长度 备注
rule_id int(11) 主键 非空 自增 借阅规则记录的唯一标识
book_rule_id int(11) 借阅规则编号 非空
book_days int(11) 借阅天数 非空
book_limit_number int(11) 限制借阅的本数 非空
book_limit_library varchar(255) 限制的图书馆 非空
book_overdue_fee double 图书借阅逾期后每天费用 非空
create_time datetime 创建时间 Java注解 JsonFormatter
update_time datetime 更新时间 Java注解 JsonFormatter

t_book_type表

列名 数据类型以及长度 备注
type_id int(11) 主键 非空 自增 图书类别记录的唯一标识
type_name varchar(32) 借阅类别的昵称 非空
type_content varchar(255) 借阅类别的描述 非空
create_time datetime 创建时间 Java注解 JsonFormatter
update_time datetime 更新时间 Java注解 JsonFormatter

🐼功能演示图

用户模块功能图

首页轮播图演示

image-20230311151755217

图书查询演示

image-20230311151815350

读者规则演示

image-20230311151837692

查看公告演示

image-20230311151858285

个人信息演示

image-20230311151918353

借阅信息演示

image-20230311151939885

违章信息演示

image-20230311151958147

读者留言演示

image-20230311152043122

图书管理员功能图

借阅图书演示

image-20230311152118721

归还图书演示

image-20230311152136821

借书报表演示

image-20230311152220983

还书报表演示

image-20230311152251587

发布公告演示

image-20230311152310736

系统管理员功能图

  • 由于篇幅受限,系统管理员功能图只展示一个图表的功能。

系统管理演示

image-20230311152338284

🐼部署项目

image-20230311152411864

  • 可以下载ZIP压缩包或者使用克隆(Git clone)
  • 复制http或者ssh的链接(github建议ssh,gittee都可以)
  • 在D盘新建一个文件夹,点击进入该文件夹,右键Git Bash Here

image-20230311152442211

  • 还没有下载Git或者不会Git的建议先看基础教程(30分钟左右)

  • 输入git init 初始化git项目 然后出现一个.git文件夹

  • 输入git remote add origin xxxxxx(xxx为刚刚复制的http或者ssh链接)

  • 输入git pull origin master 从远程代码托管仓库拉取代码

  • 成功拉取项目(前端后端都是如此)

  • 前端项目注意依赖下载使用npm install 或者 yarn install (Vscode或者Webstorm)

  • 后端项目注意maven依赖下载(IDEA(推荐)或者Ecplise)

  • 前端npm 镜像源建议淘宝镜像源,后端maven镜像源推荐阿里云镜像源(非必选,但更换后下载快速)

🐼部署项目问题

  • 乱码问题 项目采用的UFT-8
  • 一般出现乱码就是UTF-8和GBK二者相反
  • 请百度IDEA乱码和Eclipse乱码问题(描述清楚即可)

  • 点击交互按钮,没有发生反应。
  • 很明显,请求失败,浏览器打开开发者工具,Edge浏览器直接ctrl+shift+i,其他浏览器按F12
  • 查看红色的请求和响应状态码问题

  • 先阅读文档再进行问题的查询或者提问
  • 提问有技巧,模糊的发言,让高级架构师找BUG也无从下手

  • QQ:909088445

  • 晚上在线,建议先自己寻找问题,实在实现不了,可以滴我

  • 需要定制化项目和修改项目的某些的功能也可以加我

🐼项目API接口文档

  • 接口文档篇幅过大请加我QQ后私发
  • 本来想完全采用RESTFUL风格,做到一半忘记了
  • 看清楚文档的基准地址

🐷其他

  • 个人博客地址: https://luoye6.github.io/
  • 个人博客采用Hexo+Github托管
  • 采用butterfly主题可以实现定制化
  • 推荐有空闲时间的,可以花1-2天搭建个人博客用于记录笔记。

版本迭代

2023-3-19

1.引入knife4j依赖,使用 Swagger + Knife4j 自动生成 OpenAPI 规范的接口文档,前端可以在此基础上使用插件自动生成接口请求代码,降低前后端协作成本。

2.引入jsoup依赖可以自定义添加爬虫功能,可以批量添加图书并且是比较真实的数据。

3.添加事务管理器,可以进行用@Transactional指定异常类型回滚和事务传播行为。

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

图书管理系统(SpringBoot2+Vue2),全局异常拦截器,登录校验拦截器,Echarts展示借阅量,可添加爬虫功能获取图书数据。API认证采用JWT。后端CORS跨域支持。HTTP Status Code表示状态。数据返回格式JSON。 展开 收起
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/plusboy/vue_-book-manage-system_backend.git
git@gitee.com:plusboy/vue_-book-manage-system_backend.git
plusboy
vue_-book-manage-system_backend
图书管理系统后台Vue2-SpringBoot2
master

搜索帮助