Spring JDBC与事务管理

上传者: hrheikebaidu | 上传时间: 2019-12-21 19:53:56 | 文件大小: 6.18MB | 文件类型: zip
javaEE 实验三 Spring JDBC与事务管理, 一、实验目的 1、掌握Spring JDBC的配置; 2、掌握JdbcTemplae类中增删改查方法的使用; 3、了解Spring事务管理的3个核心接口; 4、了解Spring事务管理的两种方式; 5、掌握基于XML和Annotation的声明式事务管理的使用。 二.实验内容 (1)使用Spring JDBC实现书店的购书过程,即有如下一个BookShopDao接口,编写BookShopDaoImp类实现该接口中的所有方法,并通过JUnit测试这些方法。 (2)(2) 在BookShopDao中添加一个purchase购书方法,其操作流程是获取书的单价->买书(更新库存)->更新账户余额,在BookShopDaoImp中实现该方法,并使用基于XML和Annotation的声明式事务管理来确保该购书过程能正常执行(这时(1)中的方法都不需进行合法性判断,直接存储数据库),通过JUnit对该方法进行测试。

文件下载

资源详情

[{"title":"( 34 个子文件 6.18MB ) Spring JDBC与事务管理","children":[{"title":"Spring JDBC 和事务管理","children":[{"title":"Spring JDBC","children":[{"title":".project <span style='color:#111;'> 904B </span>","children":null,"spread":false},{"title":".settings","children":[{"title":".jsdtscope <span style='color:#111;'> 567B </span>","children":null,"spread":false},{"title":"org.eclipse.core.resources.prefs <span style='color:#111;'> 51B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.component <span style='color:#111;'> 464B </span>","children":null,"spread":false},{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 364B </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.jsdt.ui.superType.container <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.jsdt.ui.superType.name <span style='color:#111;'> 6B </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"com","children":[{"title":"hr","children":[{"title":"bookstore","children":[{"title":"BookShopDao.java <span style='color:#111;'> 783B </span>","children":null,"spread":false},{"title":"JdbcTest.java <span style='color:#111;'> 2.03KB </span>","children":null,"spread":false},{"title":"BookShopDaoImpl.java <span style='color:#111;'> 3.58KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"applicationContext-annotation.xml <span style='color:#111;'> 2.09KB </span>","children":null,"spread":false},{"title":"applicationContext.xml <span style='color:#111;'> 2.74KB </span>","children":null,"spread":false}],"spread":true},{"title":"build","children":[{"title":"classes","children":[{"title":"com","children":[{"title":"hr","children":[{"title":"bookstore","children":[{"title":"BookShopDaoImpl.class <span style='color:#111;'> 3.30KB </span>","children":null,"spread":false},{"title":"BookShopDao.class <span style='color:#111;'> 338B </span>","children":null,"spread":false},{"title":"JdbcTest.class <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"applicationContext-annotation.xml <span style='color:#111;'> 2.09KB </span>","children":null,"spread":false},{"title":"applicationContext.xml <span style='color:#111;'> 2.74KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"WebContent","children":[{"title":"WEB-INF","children":[{"title":"lib","children":[{"title":"spring-context-4.3.6.RELEASE.jar <span style='color:#111;'> 1.08MB </span>","children":null,"spread":false},{"title":"aspectjweaver-1.8.10.jar <span style='color:#111;'> 1.84MB </span>","children":null,"spread":false},{"title":"spring-core-4.3.6.RELEASE.jar <span style='color:#111;'> 1.07MB </span>","children":null,"spread":false},{"title":"spring-jdbc-4.3.6.RELEASE.jar <span style='color:#111;'> 417.33KB </span>","children":null,"spread":false},{"title":"commons-logging-1.2.jar <span style='color:#111;'> 60.38KB </span>","children":null,"spread":false},{"title":"spring-expression-4.3.6.RELEASE.jar <span style='color:#111;'> 257.13KB </span>","children":null,"spread":false},{"title":"spring-aspects-4.3.6.RELEASE.jar <span style='color:#111;'> 57.35KB </span>","children":null,"spread":false},{"title":"spring-aop-4.3.6.RELEASE.jar <span style='color:#111;'> 371.00KB </span>","children":null,"spread":false},{"title":"spring-beans-4.3.6.RELEASE.jar <span style='color:#111;'> 744.83KB </span>","children":null,"spread":false},{"title":"spring-tx-4.3.6.RELEASE.jar <span style='color:#111;'> 260.92KB </span>","children":null,"spread":false},{"title":"mysql-connector-java-5.1.8.jar <span style='color:#111;'> 706.70KB </span>","children":null,"spread":false},{"title":"aopalliance-1.0.jar <span style='color:#111;'> 4.36KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"META-INF","children":[{"title":"MANIFEST.MF <span style='color:#111;'> 39B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":".classpath <span style='color:#111;'> 912B </span>","children":null,"spread":false}],"spread":true},{"title":"实验三.docx <span style='color:#111;'> 84.78KB </span>","children":null,"spread":false},{"title":"bookstore.sql <span style='color:#111;'> 594B </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

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