Struts2和Hibernate框架实现图书管理系统

上传者: achenxuxu | 上传时间: 2019-12-21 19:22:56 | 文件大小: 13.98MB | 文件类型: zip
一.功能简介 1. 实现一个图书管理系统。图书信息存放到一个数据库中。图书包含信息:图书号、图书名、作者、价格、备注字段。 2. 系统要实现如下的基本管理功能: (1)用户分为两类:系统管理员,一般用户。 (2)提供用户注册和用户登录验证功能;其中登录用户的信息有:登录用户名,登录密码等。 (3)管理员可以实现对注册用户的管理(删除),并实现对图书的创建、查询、修改和删除等有关的操作。 (4)一般用户,只能查询图书,并进行借书、还书操作,每个用户最多借阅8本,即当目前借书已经是8本,则不能再借书了,只有还书后,才可以再借阅。 二.涉及技术 Struts2框架、Hibernate框架、MySQL数据库、C3P0数据池、Jsp、HTML、CSS、JavaScript等技术。 三.设计思路 1. 基于Struts2框架和Hibernate框架进行编程设计,连接MySQL数据库实现数据的增删查改,应用Jsp、HTML、CSS、JavaScript对访问页面进行编写和美化。 2. 分别创建book表和user表,用以存放图书信息和用户数据。其中user表中,设有flag以区分管理员和普通用户。 3. 分别创建Book类和User类,与数据表相对应。每本书和每个用户都有唯一的id与之对应。 4. 创建映射文件User.hbm.xml和Book.hbm.xml。 5. 创建数据库配置文件hibernate.cfg.xml。 6. 创建数据库连接工具类。 7. 设计数据库操作类:UserDao类和BookDao类。UserDao用于实现所有对user表的操作,BookDao用于实现所有对book表的操作。 8. 创建分别对应UserDao类和BookDao类的Action:UserAction和BookAction。采用基于注解的方式进行Action配置。 9. 用户账号分为管理员账号和普通用户账号,注册时加以区分,登录时即可自动判断进入对应的操作主页面。 10. 管理员可实现对用户的查询显示,模糊查询,删除,批量删除,全选和取消全选等功能;可实现对图书的查询显示,模糊查询,添加,删除,批量删除,全选和取消全选等功能。 11. 普通用户可实现借书和还书功能,借书功能通过对book表的查询,将未借出的图书按照id顺序排列显示,点击表格后方的“借阅”按钮,进行确认借阅,将book表中本书的borrowperson列的值改为本用户账号。对于借阅成功的图书可以在“当前借阅”中进行查看。还书功能通过在“当前借阅”中点击“还书”按钮,进行确认还书,将book表中本书的borrowperson列的值改为“空”,本书信息将可以在“借书”界面查看。

文件下载

资源详情

[{"title":"( 82 个子文件 13.98MB ) Struts2和Hibernate框架实现图书管理系统","children":[{"title":"BookManage_1","children":[{"title":"WebContent","children":[{"title":"image","children":[{"title":"b.jpg <span style='color:#111;'> 41.31KB </span>","children":null,"spread":false},{"title":"vv.jpg <span style='color:#111;'> 32.83KB </span>","children":null,"spread":false},{"title":"blue.jpg <span style='color:#111;'> 393.22KB </span>","children":null,"spread":false},{"title":"f.jpg <span style='color:#111;'> 135.04KB </span>","children":null,"spread":false},{"title":"d.jpg <span style='color:#111;'> 50.86KB </span>","children":null,"spread":false}],"spread":true},{"title":"META-INF","children":[{"title":"MANIFEST.MF <span style='color:#111;'> 39B </span>","children":null,"spread":false}],"spread":true},{"title":"WEB-INF","children":[{"title":"web.xml <span style='color:#111;'> 947B </span>","children":null,"spread":false},{"title":"lib","children":[{"title":"hibernate-core-4.3.10.Final.jar <span style='color:#111;'> 5.04MB </span>","children":null,"spread":false},{"title":"hibernate-jpa-2.1-api-1.0.0.Final.jar <span style='color:#111;'> 110.71KB </span>","children":null,"spread":false},{"title":"dom4j-1.6.1.jar <span style='color:#111;'> 306.54KB </span>","children":null,"spread":false},{"title":"javassist-3.11.0.GA.jar <span style='color:#111;'> 599.81KB </span>","children":null,"spread":false},{"title":"antlr-2.7.7.jar <span style='color:#111;'> 434.85KB </span>","children":null,"spread":false},{"title":"asm-tree-3.3.jar <span style='color:#111;'> 21.00KB </span>","children":null,"spread":false},{"title":"mysql-connector-java-5.1.13-bin.jar <span style='color:#111;'> 749.50KB </span>","children":null,"spread":false},{"title":"mchange-commons-java-0.2.3.4.jar <span style='color:#111;'> 567.67KB </span>","children":null,"spread":false},{"title":"asm-3.3.jar <span style='color:#111;'> 42.56KB </span>","children":null,"spread":false},{"title":"xwork-core-2.3.24.jar <span style='color:#111;'> 660.91KB </span>","children":null,"spread":false},{"title":"log4j-core-2.2.jar <span style='color:#111;'> 807.36KB </span>","children":null,"spread":false},{"title":"jboss-logging-annotations-1.2.0.Beta1.jar <span style='color:#111;'> 11.29KB </span>","children":null,"spread":false},{"title":"jandex-1.1.0.Final.jar <span style='color:#111;'> 74.76KB </span>","children":null,"spread":false},{"title":"jboss-logging-3.1.3.GA.jar <span style='color:#111;'> 55.84KB </span>","children":null,"spread":false},{"title":"struts2-convention-plugin-2.3.24.jar <span style='color:#111;'> 65.94KB </span>","children":null,"spread":false},{"title":"javassist-3.18.1-GA.jar <span style='color:#111;'> 697.46KB </span>","children":null,"spread":false},{"title":"ognl-3.0.6.jar <span style='color:#111;'> 222.65KB </span>","children":null,"spread":false},{"title":"freemarker-2.3.22.jar <span style='color:#111;'> 1.24MB </span>","children":null,"spread":false},{"title":"c3p0-0.9.2.1.jar <span style='color:#111;'> 413.94KB </span>","children":null,"spread":false},{"title":"hibernate-commons-annotations-4.0.5.Final.jar <span style='color:#111;'> 73.56KB </span>","children":null,"spread":false},{"title":"log4j-api-2.2.jar <span style='color:#111;'> 130.39KB </span>","children":null,"spread":false},{"title":"jstl-1.2.jar <span style='color:#111;'> 404.53KB </span>","children":null,"spread":false},{"title":"asm-commons-3.3.jar <span style='color:#111;'> 37.38KB </span>","children":null,"spread":false},{"title":"jboss-transaction-api_1.2_spec-1.0.0.Final.jar <span style='color:#111;'> 27.07KB </span>","children":null,"spread":false},{"title":"struts2-core-2.3.24.jar <span style='color:#111;'> 812.47KB </span>","children":null,"spread":false},{"title":"commons-io-2.2.jar <span style='color:#111;'> 169.52KB </span>","children":null,"spread":false},{"title":"hibernate-c3p0-4.3.10.Final.jar <span style='color:#111;'> 39.14KB </span>","children":null,"spread":false},{"title":"jxl.jar <span style='color:#111;'> 708.73KB </span>","children":null,"spread":false},{"title":"commons-lang3-3.2.jar <span style='color:#111;'> 375.75KB </span>","children":null,"spread":false},{"title":"commons-fileupload-1.3.1.jar <span style='color:#111;'> 67.38KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"book","children":[{"title":"result.jsp <span style='color:#111;'> 604B </span>","children":null,"spread":false},{"title":"insert.jsp <span style='color:#111;'> 2.63KB </span>","children":null,"spread":false},{"title":"now_borrow.jsp <span style='color:#111;'> 1.95KB </span>","children":null,"spread":false},{"title":"borrow.jsp <span style='color:#111;'> 2.18KB </span>","children":null,"spread":false},{"title":"manage_book.jsp <span style='color:#111;'> 3.56KB </span>","children":null,"spread":false},{"title":"borrow_result.jsp <span style='color:#111;'> 1.64KB </span>","children":null,"spread":false},{"title":"return_result.jsp <span style='color:#111;'> 1.64KB </span>","children":null,"spread":false}],"spread":true},{"title":"user","children":[{"title":"login_result.jsp <span style='color:#111;'> 351B </span>","children":null,"spread":false},{"title":"register_result.jsp <span style='color:#111;'> 747B </span>","children":null,"spread":false},{"title":"main_manager.jsp <span style='color:#111;'> 1.39KB </span>","children":null,"spread":false},{"title":"result.jsp <span style='color:#111;'> 606B </span>","children":null,"spread":false},{"title":"login.jsp <span style='color:#111;'> 1.95KB </span>","children":null,"spread":false},{"title":"register.jsp <span style='color:#111;'> 4.31KB </span>","children":null,"spread":false},{"title":"main_user.jsp <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"manage_user.jsp <span style='color:#111;'> 3.35KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":".settings","children":[{"title":"org.eclipse.wst.jsdt.ui.superType.name <span style='color:#111;'> 6B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.project.facet.core.xml <span style='color:#111;'> 345B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.component <span style='color:#111;'> 488B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.jsdt.ui.superType.container <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":".jsdtscope <span style='color:#111;'> 567B </span>","children":null,"spread":false},{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 364B </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"com","children":[{"title":"cxx","children":[{"title":"dao","children":[{"title":"UserDao.java <span style='color:#111;'> 4.40KB </span>","children":null,"spread":false},{"title":"BookDao.java <span style='color:#111;'> 4.43KB </span>","children":null,"spread":false}],"spread":true},{"title":"action","children":[{"title":"UserAction.java <span style='color:#111;'> 5.96KB </span>","children":null,"spread":false},{"title":"BookAction.java <span style='color:#111;'> 5.94KB </span>","children":null,"spread":false}],"spread":true},{"title":"entity","children":[{"title":"User.hbm.xml <span style='color:#111;'> 973B </span>","children":null,"spread":false},{"title":"User.java <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false},{"title":"Book.hbm.xml <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false},{"title":"Book.java <span style='color:#111;'> 2.28KB </span>","children":null,"spread":false}],"spread":true},{"title":"util","children":[{"title":"HibernateUtil.java <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"struts.xml <span style='color:#111;'> 281B </span>","children":null,"spread":false},{"title":"hibernate.cfg.xml <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false}],"spread":true},{"title":".project <span style='color:#111;'> 1.02KB </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 3.17KB </span>","children":null,"spread":false},{"title":"build","children":[{"title":"classes","children":[{"title":"com","children":[{"title":"cxx","children":[{"title":"dao","children":[{"title":"UserDao.class <span style='color:#111;'> 5.68KB </span>","children":null,"spread":false},{"title":"BookDao.class <span style='color:#111;'> 5.78KB </span>","children":null,"spread":false}],"spread":true},{"title":"action","children":[{"title":"BookAction.class <span style='color:#111;'> 6.45KB </span>","children":null,"spread":false},{"title":"UserAction.class <span style='color:#111;'> 5.80KB </span>","children":null,"spread":false}],"spread":true},{"title":"entity","children":[{"title":"User.hbm.xml <span style='color:#111;'> 973B </span>","children":null,"spread":false},{"title":"User.class <span style='color:#111;'> 1.99KB </span>","children":null,"spread":false},{"title":"Book.hbm.xml <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false},{"title":"Book.class <span style='color:#111;'> 3.15KB </span>","children":null,"spread":false}],"spread":true},{"title":"util","children":[{"title":"HibernateUtil.class <span style='color:#111;'> 1.81KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"struts.xml <span style='color:#111;'> 281B </span>","children":null,"spread":false},{"title":"hibernate.cfg.xml <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明