1、项目介绍
基于Jsp+Servlet+Mysql的图书馆系统、图书借阅管理系统,包含用户图书借阅、图书管理员、系统管理员界面,功能齐全。
一、用户模块
1. 查看公告:能看到图书管理员发布的公告信息。
2. 图书查看:分页显示,能看到图书总览,能通过图书编号、图书名称、作者、存放位置、图书描述进行模糊查询
3. 个人违章信息(登录后):个人历史违章信息与查询
4. 图书馆读者留言(登录后):对图书馆的建议,或对书籍的评价
5. 查看借阅规则:不同的规则有不同的借阅限定数量、限定时间、超期费用
6. 个人信息(登录后):对个人信息的查看与登录密码的修改
7. 个人借阅信息(登录后):对个人借阅记录的分页查看与查询
二、图书管理员模块
1. 借还图书:帮助用户借阅图书,并判断符不符合借阅规则、返还图书时判断有没有超期,超期则输出超期费用再归还
2. 借阅报表:分页显示所有借阅记录、能进行查询和输出结果到excel公告管理:能添加编辑和删除公告
3. 还书报表:分页显示所有未还的书籍,能通过借阅证号、图书编号、借阅日期、截止日期等条件进行模糊查询
4. 个人信息修改:修改个人信息、密码等
三、系统管理员模块
1. 书籍管理:分页,新添图书,设置图书各种信息,编辑删除,通过编号、书名、作者、描述等进行搜索,输出结果到excel,并且能查看该书籍被谁借阅过。
2. 分类管理:分页显示,增删改书籍分类,书籍分类方便查阅整理
3. 借阅证管理:分页显示所有借阅证,增删改查用户借阅证,查看该借阅证所有的借阅记录
4. 借阅规则管理:能显示、编辑、删除所有借阅规则,借阅规则将决定该图书证能借阅什么图书馆的图书,能借多少本,能借多久以及超期每天的费用。
5. 借阅信息查询:分页显示,能条件查询超期没还的,根据编号、借阅证号、书籍编号、借阅日期等进行模糊查询,输出结果到excel等,系统管理员只能查询,不能增删改借阅信息,这个操作由图书管理员操作。
6. 图书管理员管理:对图书管理员进行增删改操作,但是不能修改原来的账号
7. 图书借阅统计:通过折线图将图书馆近30天的每天借阅书籍数量直观的显示出来。
2、技术框架
运行系统:Windows
前端框架:jsp+js+css+bootstrap+layui+html
后端框框:java+servlet
数据库:MySQL
系统架构:B/S
是否前后端分离:否
Maven项目:否
数据库表数量:10
开发工具:MySQL5.7、JDK8 (JDK1.8)、Tomcat9.0、 IntelliJ IDEA
3、演示视频
基于Jsp+Servlet+Mysql的图书馆系统
4、功能截图
![](https://img-blog.csdnimg.cn/img_convert/54a26885debe24f4c4a83c7a3e431ddc.png)
![](https://img-blog.csdnimg.cn/img_convert/d03ca13c18a5e5eb39f07e0c7a507793.png)
![](https://img-blog.csdnimg.cn/img_convert/cad708f388c265deb38c271410cd5d25.png)
![](https://img-blog.csdnimg.cn/img_convert/7f68645d078c0d4514863f284aa8c587.png)
![](https://img-blog.csdnimg.cn/img_convert/b95beeff1314e22764a109b3f223e540.png)
![](https://img-blog.csdnimg.cn/img_convert/e0c66750841ceed9077924e04ecf9f57.png)
![](https://img-blog.csdnimg.cn/img_convert/dd0a90eac119a5308c10ce7a0cb0293f.png)
![](https://img-blog.csdnimg.cn/img_convert/07ffd76b3e3be8304b1ffdd16ece3ad7.png)
![](https://img-blog.csdnimg.cn/img_convert/fa653559e5843dcc46bb0f6eb3f594c8.png)
![](https://img-blog.csdnimg.cn/img_convert/e78f428a30ec5de218aae2eb1e35ae19.png)
![](https://img-blog.csdnimg.cn/img_convert/c89fb8800ce6cc1f8b6a902efce43b83.png)
![](https://img-blog.csdnimg.cn/img_convert/2c1d2bc2e3e8836e5d84c467b87cfea2.png)
![](https://img-blog.csdnimg.cn/img_convert/9a2c1b8c70153e18d0b95deb4a72e6c5.png)
![](https://img-blog.csdnimg.cn/img_convert/bba3d26c4422b99480eadd3aa7df97ee.png)
![](https://img-blog.csdnimg.cn/img_convert/459bca6ce7956c27011d6ff5535257b2.png)
![](https://img-blog.csdnimg.cn/img_convert/3947ac17f591620da30ddfe5ff8fa770.png)
![](https://img-blog.csdnimg.cn/img_convert/e6b1abc4032749cc1ed1f08fbfebddb5.png)
![](https://img-blog.csdnimg.cn/img_convert/1e35553f554e7bf3c8365624b343eeac.png)
![](https://img-blog.csdnimg.cn/img_convert/854b419c08e8650ed17c57317f61bfdd.png)
![](https://img-blog.csdnimg.cn/img_convert/54c8bb89037b8cb63efaa481850eceb6.png)
![](https://img-blog.csdnimg.cn/img_convert/c11f15be57cce7788d362dab3a238c01.png)
5、文档截图
![](https://img-blog.csdnimg.cn/img_convert/6d46d9863103e5d84a752da24a5af07f.png)
![](https://img-blog.csdnimg.cn/img_convert/9f1b5f96c4eab88cecddd330dd8960d0.png)
![](https://img-blog.csdnimg.cn/img_convert/1bdf37c5eb88b27fed8b5e139b277fc7.png)
![](https://img-blog.csdnimg.cn/img_convert/b5872d807fd19ce935759eb53c092923.png)
6、代码示例
package servlet.admin;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.sql.Connection;
import javabean.Base;
import net.sf.json.JSONObject;
/**
* Servlet implementation class BookAdd
*/
@WebServlet("/admin/bookAdd")
public class BookAdd extends HttpServlet {
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
resp.setContentType("application/json; charset=utf8");
String name = req.getParameter("name");
String author = req.getParameter("author");
String library_id = req.getParameter("library_id");
String sort_id = req.getParameter("sort_id");
String position = req.getParameter("position");
String status = req.getParameter("status");
String description = req.getParameter("description");
System.out.println(description+"-------------"); //debug
JSONObject json = new JSONObject();
Connection connection = null;
PreparedStatement pstmt = null;
//ResultSet resultSet = null;
int result = 0;
String sql = "insert into books(name, author, library_id, sort_id, position, status, description) values(?,?,?,?,?,?,?)";
System.out.println(sql);
PrintWriter out = resp.getWriter();
try {
connection = (Connection) Base.getConnection();
pstmt = connection.prepareStatement(sql);
pstmt.setString(1, name);
pstmt.setString(2, author);
pstmt.setString(3, library_id);
pstmt.setString(4, sort_id);
pstmt.setString(5, position);
pstmt.setString(6, status);
pstmt.setString(7, description);
result = pstmt.executeUpdate();
} catch (SQLException e) {
} catch (ClassNotFoundException e) {
e.printStackTrace();
}finally {
try {
Base.closeResource(connection, pstmt, null);
} catch (SQLException e) {
e.printStackTrace();
}
}
if(result==1) {
json.put("code", "0");
json.put("msg", "success");
}else {
json.put("code", "1");
json.put("msg", "error");
}
out.write(json.toString());
}
}