基于Java的图书管理系统

项目技术:

后端:servlet

前端:bootstrap,js,css,Ajax等

开发工具:idea

数据库:mysql 5.7

JDK版本:jdk1.8

服务器:tomcat8

项目介绍:

该系统采用java语言,servlet开发,mysql数据库,具有完整的业务逻辑,适合基础比较薄弱学生使用。系统分为三个角色,分别为系统管理员、图书管理员、读者。功能包含:图书维护、用户维护、图书借阅、归还等操作。

文档信息:

部分功能展示:

系统登录:

管理员首页

查看首页,及其他功能

用户管理

查看用户信息

图书管理

对图书信息进行维护

图书管理员首页

查看首页,及其他功能

借阅书籍记录

查看借阅记录

读者首页

查看首页信息

 部分代码:

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 		request.setCharacterEncoding("UTF-8"); 		try {  			//1. 获取客户端提交上来的数据 			String bookname = request.getParameter("bookname"); 			String author = request.getParameter("author"); 			String publish = request.getParameter("publish"); 			int bookcount = Integer.parseInt(request.getParameter("bookcount")); 			String booktype = request.getParameter("booktype"); 			System.out.println(bookname); 			//2. 添加到数据库 			 			 			Book Book = new Book(0, bookname, publish, bookcount, booktype, author); 			BookDao service = new BookDaoImpl(); 			service.insert(Book); 			 			request.getRequestDispatcher("BookListServlet").forward(request, response); 			 		} catch (Exception e) { 			e.printStackTrace(); 		} 	 	}

数据层:

@Override 	public List<Book> findAll() throws SQLException { 		QueryRunner runner = new QueryRunner(JDBCUtil.getDataSource()); 		return runner.query("select * from book", new BeanListHandler<Book>(Book.class)); 	}  	@Override 	public void insert(Book Book) throws SQLException { 		QueryRunner runner = new QueryRunner(JDBCUtil.getDataSource()); 		runner.update("insert into book (bookname,publish,author,bookcount,booktype) values(?,?,?,?,?)", 				Book.getBookname(), 				Book.getPublish(), 				Book.getAuthor(), 				Book.getBookcount(), 				Book.getBooktype() 				); 	}

以上就是部分功能展示,从整体上来看,本系统功能是十分完整的,而且也与当前的热点话题关联,界面设计简洁大方,交互友好,数据库设计也很合理,规模适中,比较适合毕业设计和课程设计的相关应用。




好了,今天就到这儿吧,小伙伴们点赞、收藏、评论,一键三连走起呀,下期见~~
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值