zxc337
V2EX  ›  Java

java 对 mybatis 的封装,包括分页实现,CRUD 实现

  •  
  •   zxc337 · Mar 6, 2015 · 4439 views
    This topic created in 4147 days ago, the information mentioned may be changed or developed.
    写了一个对mybatis的封装源码在 http://lawrence-zxc.github.io/2014/06/15/java-mybatis/ 这里,BaseDao是一个基础类,对Mapper中方法的实现,支持Oracle,Mysql等数据库,需要加入分页的xml配置,可留言在我的github上获取
    1 replies    2015-03-06 17:41:38 +08:00
    zxc337
        1
    zxc337  
    OP
       Mar 6, 2015
    分页可以不注入SqlSessionTemplate,用Mapper实现,在BaseDao里面封装;注入SqlSessionTemplate这个是为了切面统计sql执行时间
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3917 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 05:09 · PVG 13:09 · LAX 22:09 · JFK 01:09
    ♥ Do have faith in what you're doing.