由于自己学习的版本比较落后,这里就不总结了 在我这个版本整合的过程中的几点问题: 1.在web.xml的配置过程中: 2.注:struts2 和 Spring 整合之后,Action 的 生成方式有两种 第一种:<action name="user" class="com.bjsxt.registr ...
分类:
其他好文 时间:
2017-08-20 16:56:52
阅读次数:
115
声明式的事务管理(AOP的主要用途之一) (Annotation的方式) 1.加入annotation.xsd 2.加入txManager bean 3.<tx:annotation-driven 4.在需要的事务的方法上加 : @Transactional @Transactional 1.被注解 ...
分类:
编程语言 时间:
2017-08-20 15:53:22
阅读次数:
128
使用xml的方式进行声明式的事务管理 推荐使用xml的方式,因为可以同时为多个方法进行声明 ...
分类:
编程语言 时间:
2017-08-20 15:47:06
阅读次数:
197
Spring 整合 Hibernate 1.Spring指定 database,给下面创建的 SessionFactory用 2.创建 SessionFactory ,然后注入给DAO去使用 3.往DAO中注入SessionFactory ...
分类:
编程语言 时间:
2017-08-20 12:42:57
阅读次数:
235
原文地址:http://www.cnblogs.com/fangjian0423/p/spring-mybatis-MapperScannerConfigurer-analysis.html 前言 本文将分析mybatis与spring整合的MapperScannerConfigurer的底层原理,... ...
分类:
移动开发 时间:
2017-08-20 12:35:12
阅读次数:
219
今天数据库连接配置全写在hibernate.cfg.xml的时候没有问题。与spring整合的时候就出现了这个问题,重复查了代码,没找到问题 org.springframework.beans.factory.BeanCreationException: Error creating bean wi ...
分类:
Web程序 时间:
2017-08-18 14:35:31
阅读次数:
243
今天尝试spring整合mybatis时遇到这么一个问题,就是在配置sqlSessionFactory时是否要配置mapperLocations的问题。 结论是:如果Mapper.xml与Mapper.class在同一个包下且同名,spring扫描Mapper.class的同时会自动扫描同名的Map ...
分类:
移动开发 时间:
2017-08-16 17:02:21
阅读次数:
252
Spring配置文件 Hibernate配置文件 web.xml 目录结构 jar包 ...
分类:
编程语言 时间:
2017-08-16 13:14:55
阅读次数:
230
在Spring4和Mybatis3整合的时候,dao层注入'sqlSessionFactory'或'sqlSessionTemplate'会报错解决办法如下: 原因是因为Mybatis3依赖的jar位 mybatis-spring-1.2.0.jar,这个版本及以上的版本中对SqlSessionDa ...
分类:
数据库 时间:
2017-08-15 21:19:22
阅读次数:
1584
Spring集成quart有两种方式,一种是实现Job接口,一种是继承QuartzJobBean 刚开始报错:持久化时未序列化异常 java.io.NotSerializableException: Unable to serialize JobDataMap for insertion into ...
分类:
编程语言 时间:
2017-08-15 18:13:44
阅读次数:
339