![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mybatis
booooooooooooooooooo
这个作者很懒,什么都没留下…
展开
-
mybatis返回List<Map>
在进行统计相关操作时,也许需要返回如List形式的。mapperl.xml中: <![CDATA[ select count(*) as amount, estate_type as type, status from estate where status=#{status} group by estate_type ]]> 在ma原创 2012-12-05 17:27:16 · 22113 阅读 · 4 评论 -
myBatis调用带返回值的存储过程(mysql)
折腾了一上午才顺利的把这个跑通了,废话不多说,上代码!1.存储过程返回一个StringCREATE PROCEDURE `sp_redblack_prize`(OUT result_record varchar(2000000)){……}2.在mapper.xml中在这里要注意:Set resultType="map" on element. I think for store原创 2012-11-27 15:07:16 · 7994 阅读 · 1 评论 -
MyBatis 缓存机制深度解剖 / 自定义二级缓存
缓存概述 正如大多数持久层框架一样,MyBatis 同样提供了一级缓存和二级缓存的支持;一级缓存基于 PerpetualCache 的 HashMap 本地缓存,其存储作用域为 Session,当 Session flush 或 close 之后,该Session中的所有 Cache 就将清空。二级缓存与一级缓存其机制相同,默认也是采用 PerpetualCache,HashMap存转载 2013-05-03 14:50:06 · 1031 阅读 · 0 评论 -
MyBatis+Spring 基于接口编程的原理分析
整合Spring3及MyBatis3对于整合Spring及Mybatis不作详细介绍,可以参考: MyBatis 3 User Guide Simplified Chinese.pdf,贴出我的主要代码如下:package org.denger.mapper; import org.apache.ibatis.annotations.Param; import o转载 2013-06-17 00:41:31 · 1127 阅读 · 0 评论