SqlSesstionFactory:


原始的dao方法的不足:


mapper的规范:

1.

2、3、4.



具体实现:
别忘了把写的UserMapper.xml加入SqlMapperConfig.xml配置文件中:


sqlSession全过程(只要sqlMapConfig.xml文件里有映射文件,下面的是User.xml,而映射文件写了sql语句):

对于模糊查询返回值的出入:



原理:

配置文件:



mappers:



批量加载mapper:

typeAliases:


综合查询:


resultType:

查询总数:


resultMap:


动态sql:



4977

被折叠的 条评论
为什么被折叠?



