zxc337
V2EX  ›  Java

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

  •  
  •   zxc337 · Mar 6, 2015 · 4602 views
    This topic created in 4289 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
    zxc337
    OP
    Mar 6, 2015
    1
    分页可以不注入SqlSessionTemplate,用Mapper实现,在BaseDao里面封装;注入SqlSessionTemplate这个是为了切面统计sql执行时间
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1909 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 15:41 · PVG 23:41 · LAX 07:41 · JFK 10:41
    ♥ Do have faith in what you're doing.