2016年1月5日

spring整合struts2

摘要: 1. Spring 如何在 WEB 应用中使用 ?1). 需要额外加入的 jar 包:spring-web-4.0.0.RELEASE.jarspring-webmvc-4.0.0.RELEASE.jar2). Spring 的配置文件, 没有什么不同3). 如何创建 IOC 容器 ? ①. 非 W... 阅读全文

posted @ 2016-01-05 13:13 zoghin 阅读(135) 评论(0) 推荐(0)

spring 整合hibernate

摘要: 1. Spring 整合 Hibernate 整合什么 ?1). 有 IOC 容器来管理 Hibernate 的 SessionFactory2). 让 Hibernate 使用上 Spring 的声明式事务2. 整合步骤:1). 加入 hibernate①. jar 包②. 添加 hibernat... 阅读全文

posted @ 2016-01-05 13:11 zoghin 阅读(85) 评论(0) 推荐(0)

Spring 事务

摘要: Spring事务的使用:通过注解的方式使用事务1 配置事务管理器2 启动事务注解3 添加事务注解@Transactionalpublic void checkout(...){ .......}注意:一、事务的传播行为 @Transactional(propagation=Propagation.R... 阅读全文

posted @ 2016-01-05 00:04 zoghin 阅读(105) 评论(0) 推荐(0)

导航