Java Web programming - library management system

This is a library management system, all written in native Java Web, and the front-end and back-end codes are all written by myself. This is the first time I write a blog, I hope everyone can support it.

Project structure overview

Tools and techniques used

Front-end page design: html+css

Back-end technology: jsp+servlet+javaBean+jdbc+dao

Server version: Tomcat8.5

Database: Mysql database

Development tools: Eclipse, Chorme, Mysql, Navicat Premium 15

Database Design of Library Management System

1. user (user information table) field: username (user name (primary key)) password (password) sex (sex)

 2. Administrator (administrator information table) field: username (user name (primary key)) password (password) sex (sex)

 3. book (book information table) field: number (book number (primary key)) bookname (book title) writer (author) price (price) typ (type) floor (location) condi (state)

4. borrowbook (borrowing information table) field: id (primary key) number (book number) bookname (book title) writer (author) price (price) typ (type) floor (location) name (borrower user name) ftime ( Borrowing time) ltime (book return time) condi (status)

5. amessage (Administrator notification information table) field: id (primary key) content (content) time (time)

 6. umessage (user feedback information table) field: id (primary key) name (user name) content (content) time (time)

 7. message (Administrator message information form for users) Field: id (primary key) content (content) time (time) name (user name)

 Database logical structure

(1) user (user information table) stores basic user information

(2) administrator (administrator information table) stores the basic information of the administrator

(3) book (book information table) stores the basic information of the book, and the condi field is used to store the status of the book, that is, whether it is borrowed. The default is no. If it is borrowed, it is yes, and if it is returned , it is no

(4) borrowbook (borrowing information table) is used to store the information of borrowed books, where ftime (borrowed time) ltime (if not returned, it is the latest return time (the latest return time is the last three days of the borrowing time) month), if it is returned, it is the return time) condi (the status of the borrowed book, that is, whether to return it, the default is No , if it is returned, it is Yes )

(5) amessage (notification information table issued by the administrator) is used to store the notification issued by the administrator (all users can see it in the inbox)

(6) umessage (user feedback information table) is used to store user feedback information

(7) message (Administrator's message information table for users) is used to store messages from administrators to users

 System implementation

(1) Login, registration, and exit modules

Function: Realize the login and logout of users and administrators and the registration of users

View layer: B_login.jsp (login page) B_regitesr.jsp (registration page)

  1. com.book.bean: B_user.java (packaging user basic information class) B_administrator.java (packaging administrator basic information class)
  2. com.book.dao:   B_adiministratordao.java    B_userdao.java()

Contains U_adduser (add user), U_finduser (find user), A_adduser (add administrator), A_finduser (find administrator)

  1. com.book.dao.impl: B_administratorimpl.java    B_userimpl.java (interface for implementing methods)
  2. com.book.servlet   B_logionservlet.java   B_registerservlet.java   B_EncodingFilter.java (encoding filter)   B_exitservlet.java (exit, destroy session)

 

(2) User query book module

Function: query books, borrow books

1. View layer: B_referbook.jsp (find books)  B_referbook1.jsp (borrow books)

2、com.book.bean:  B_borrowbook.java(包装借阅记录的类)

3、com.book.dao:   B_borrowbookdao.java   borrow(借阅图书方法)

4、com.book.dao.impl  B_borrowbookimpl.java (实现借阅功能的接口)

5、com.book.servlet   B_borrowbookservlet.java

(3)用户借阅记录模块

功能:查看借阅记录、还书

  1. 视图层:B_u.record.jsp
  2. com.book.bean:  B_borrowbook.java包装借阅记录的类)
  3. com.book.dao:   B_returnbookdao.java   returnbook(还书方法)
  4. com.book.dao.impl:  B_returnbookimpl.java  (实现还书功能的接口)
  5. com.book.servlet:   B_returnbookservlet.java

 

(4)用户收件箱模块

功能:可以接收来自管理员的信息

  1. 视图层:B_u.inbox.jsp

(5)系统反馈模块

功能:可以向管理员反馈系统问题

  1. 视图层:  B_u.feedback.jsp
  2. com.book.bean:  B_umessage.java (a class that wraps user-feedback information)
  3. com.book.dao:   B_umessagedao.java   addcontent (method of submitting message)
  4. com.book.dao.impl:   B_umessageimpl.java (interface for implementing message submission function)
  5. com.book.servlet:  B_umessageservlet.java

 

(6) Set the module

Function: You can modify your own password

  1. View layer: B_u.set.jsp (user settings) B_a.set.jsp (administrator settings)
  2. com.book.bean:  B_user.java (class that wraps user information) B_administrator.java (class that wraps administrator information)
  3. com.book.dao:   B_usetdao.java B_asetdao.java   u_findpass, a_findpass (find original password) u_mod, a_mod (change password)
  4. com.book.dao.impl: B_usetimpl.java    (implement u_findpass and u_mod methods) B_asetimpl.java   (implement a_findpass and a_mod methods)
  5. com.book.servlet:   B_setservlet.java

  

(7) Administrator user management module

Function: Realize the functions of viewing user borrowing records, deleting users, and leaving messages to users

  1. View layer: B_u.control.jsp (main page)   B_a.check.jsp (check borrowing records) B_a.mass.jsp (message page)
  2. com.book.bean: B_mass.java (the class that wraps the administrator's message to the user) B_user.java (the class that wraps the user information)
  3. com.book.dao:  B_massdao.java   addmass (add message)  B_udeletedao.java   udelete (delete user method)
  4. com.book.dao.impl:  B_massimpl.java   (to implement the method of adding messages) B_udeleteimpl.java (to implement the function of deleting users, which can only be deleted when all books borrowed by the user are returned)
  5. com.book.servlet:  B_massservlet.java  B_udeleteservlet.java

(8) The administrator manages the book module

Functions: add books, view all books, view book details

  1. View layer: B_bookadmi.jsp (add books)  B_bookadmi1.jsp , B_bookadmi2.jsp (view books) B_bookadmi2.jsp (view book details)
  2. com.book.bean:  B_book.java (packaging book information class)
  3. com.book.dao:   B_bookdao.java addbook (add book)
  4. com.book.dao.impl:  B_bookimpl.java  (realize the function of adding books)
  5. com.book.servlet:    B_bookservlet.java

 

(9) The administrator releases the notification module

Function: Can issue notifications to all users

  1. View layer: B_a.feedback.jsp
  2. com.book.bean: B_amessage.java (packaging release notification information class)
  3. com.book.dao:  B_amessagedao.java   addcontent (add information)
  4. com.book.dao.impl:  B_amessageimpl.java   (implement addcontent function)
  5. com.book.servlet:  B_amessageservlet.java

(10)用户反馈模块

功能:查看用户反馈的内容、删除反馈内容

  1. 视图层:  B_a.inbox.jsp
  2. com.book.bean:   B_ainbox.java(包装反馈信息的ID)
  3. com.book.dao:    B_deainboxdao.java  deleteinbox(删除用户反馈信息)
  4. com.book.dao.impl:B_deleteinbox.java(实现删除信息功能)
  5. com.book.servlet: B_deleteinboxservlet.java

代码太长这里就不展示了,可以自己去百度网盘把项目下载下来然后导入

 链接:https://pan.baidu.com/s/1ihijAysY47jL5957a10Zbg 
提取码:d47z

 

Guess you like

Origin blog.csdn.net/weixin_58183116/article/details/123149553