随笔分类 - mybatis
摘要:1. isEqual select sum(cou) from ( select count(*) cou from TABLE_NAME_a T where 1=1 <isEqual property = "type" compareValue="xxx"> and T.aa_type = #{a
阅读全文
摘要:插件编写(plugin) 步骤: 1. 编写Interceptor的实现类: MyFirstPlug 2. 使用@Intercepts注解完成插件签名 3. 将写好的插件注册到全局配置文件中 package com.feng.config; import org.apache.ibatis.exec
阅读全文
摘要:Mybatis Generator: 简称MBG,是一个专门为Mybatis框架使用者定制的代码生成器,可以快速的根据表生成对应的映射文件、接口、以及bean类。支持基本的增删改查,以及QBC风格的条件查询。但是表连接、存储过程等复杂sql的定义不支持自动生成; 官方文档地址:http://www.
阅读全文
摘要:Mybatis 通过使用内置的日志工厂提供日志功能。内置日志工厂将会把日志工作委托给下面的实现之一: SLF4J Apache Commons Logging Log4j 2 Log4j (deprecated since 3.5.9) JDK logging MyBatis 内置日志工厂基于运行时
阅读全文
摘要:如果不太熟悉MyBatis使用的请先参见MyBatis官方文档,这对理解其架构设计和源码分析有很大好处。 一、概述 MyBatis并不是一个完整的ORM框架,其官方首页是这么介绍自己 The MyBatis data mapper framework makes it easier to use a
阅读全文
摘要:mybatis与spring的整合: 要使用 MyBatis-Spring 模块,只需要在类路径下包含 mybatis-spring-2.0.7.jar 文件和相关依赖即可。 <dependency> <groupId>org.mybatis</groupId> <artifactId>mybati
阅读全文

浙公网安备 33010602011771号