最近做了一个项目,需要使用Spring+mybatis+postgresql,下面记录一下整合步骤:一、准备JAR包:我使用的是maven,所以直接晒出pom.xml 4.0.0 test.qunar.com web 0.0.1-SNAPSHOT jar web ...
分类:
数据库 时间:
2014-07-26 14:10:06
阅读次数:
373
最近做了一个项目,使用Mybatis自动生成代码,下面做一下总结,被以后参考:一、提前准备:1、工具类:mybatis-generator-core-1.3.2.jar2、postgresql驱动:postgresql-9.2-1003-jdbc4.jar3、xml文件这些我都上传到了附件上,下载链...
分类:
数据库 时间:
2014-07-26 09:50:57
阅读次数:
3871
上一篇博文《SSM三大框架整合详细教程》详细说了如何整合Spring、SpringMVC和MyBatis这三大框架。但是没有说到如何配置mybatis的事务管理,实现开发中,事务是必不可少的。本篇作为对上一篇的补充,说明在SSM框架中如何使用注解的形式进行事务管理。
什么是事务?
在编写业务的过程中,会需要进行事务处理,当需要执行多条插入语句时,如果前几条成功,而最...
分类:
其他好文 时间:
2014-07-25 11:04:31
阅读次数:
1054
spring-db-context.xml:<?xmlversion="1.0"encoding="UTF-8"?><beansxmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http:..
分类:
编程语言 时间:
2014-07-23 13:44:37
阅读次数:
311
warn:Skipping MapperFactoryBean with name ‘appOperateRecordMapper‘ and ‘XX.XX.XX.daor‘ mapperInterface. Bean already defined with the same name! 2014-07-22 18:02:29? WARN [main] (ClassPathMapperSc...
分类:
编程语言 时间:
2014-07-23 00:35:38
阅读次数:
315
一、对源码先上一个结构图: 源代码主要在org.apache.ibatis目录下,18个包,其中在应用中主要的包有:builder、session、cache、type、transaction、datasource、jdbc、mapping,提供支撑服务的包有annotation、...
分类:
其他好文 时间:
2014-07-22 22:37:53
阅读次数:
404
本篇介绍一些Spring与其他框架结合的实用功能,包括:Apache CXF WebService框架、Redis缓存、RabbitMQ消息、MyBatis框架。
另外对于Profile,也是Spring3.0开始新加的功能,对于开发测试环境、和生产环境分别采用不同的配置,有一定用处。...
分类:
编程语言 时间:
2014-07-22 14:10:04
阅读次数:
449
xml文件参数对象:1 public class Columns{2 private String basedate_code;3 private String tableName;4 private String codeDescribeindex;5 privat...
分类:
数据库 时间:
2014-07-22 00:06:34
阅读次数:
226
XMLMapperBuilder.java ? //解析<cache?/>?配置元素,创建cache对象
private?void?cacheElement(XNode?context)?throws?Exception?{
????if?(context?!=?null)?{
??????String?typ...
分类:
其他好文 时间:
2014-07-21 23:31:03
阅读次数:
414
MyBatis3.2 开篇 第一讲-CRUD,基于Maven构建的MyBatis3.2.5 CRUD示例项目...
分类:
其他好文 时间:
2014-07-21 15:25:05
阅读次数:
212