文件名称:mybatis3中文文档
文件大小:1.17MB
文件格式:PDF
更新时间:2017-11-12 09:49:58
mybatis3
目录 什么是MyBatis?............................................................................................................. 5 入门................................................................................................................................. 5 从XML中构建SqlSessionFactory .............................................................................. 5 不使用XML构建SqlSessionFactory........................................................................... 6 从SqlSessionFactory中获取SqlSession....................................................................... 6 探究已映射的SQL语句 ............................................................................................ 7 命名空间的一点注释 .......................................................................................... 8 范围和生命周期 ........................................................................................................ 8 SqlSessionFactoryBuilder ..................................................................................... 8 SqlSessionFactory................................................................................................ 9 SqlSession .......................................................................................................... 9 Mapper实例 ....................................................................................................... 9 XML映射配置文件 ........................................................................................................ 10 properties................................................................................................................. 10 Settings ....................................................................................................................11 typeAliases .............................................................................................................. 12 typeHandlers ............................................................................................................ 13 objectFactory ........................................................................................................... 14 plugins .................................................................................................................... 15 environments............................................................................................................ 16 transactionManager ............................................................................................ 17 dataSsource....................................................................................................... 17 mappers ................................................................................................................... 19 SQL映射的XML文件 ................................................................................................... 19 select....................................................................................................................... 20 insert,update,delete .............................................................................................. 21 sql........................................................................................................................... 23 Parameters ............................................................................................................... 24 resultMap ................................................................................................................ 25 高级结果映射................................................................................................... 27 id,result.......................................................................................................... 29 支持的JDBC类型 ............................................................................................ 30 构造方法.......................................................................................................... 30 关联................................................................................................................. 31 集合................................................................................................................. 34 鉴别器 ............................................................................................................. 36 缓存........................................................................................................................ 38 使用自定义缓存 ............................................................................................... 38 参照缓存................................................................................................................. 39 动态SQL ................................................................................................................ 39 if ..................................................................................................................... 40 choose, when, otherwise ..................................................................................... 40 trim, where, set .................................................................................................. 41 foreach ............................................................................................................. 43 Java API ......................................................................................................................... 43 应用目录结构.......................................................................................................... 43 SqlSessions .............................................................................................................. 44 SqlSessionFactoryBuilder ................................................................................... 44 SqlSessionFactory.............................................................................................. 46 SqlSession ........................................................................................................