mybatis :mapper代理方法 selectOne selectList namespace
作者:互联网
- selectOne和selectList
动态代理对象调用sqlSession.selectOne()和sqlSession.selectList()是根据mapper接口方法的返回值决定,如果返回list则调用selectList方法,如果返回单个对象则调用selectOne方法。
2.namespace
mybatis官方推荐使用mapper代理方法开发mapper接口,程序员不用编写mapper接口实现类,使用mapper代理方法时,输入参数可以使用pojo包装对象或map对象,保证dao的通用性。
标签:mapper,selectList,namespace,代理,接口,方法,selectOne 来源: https://blog.csdn.net/sinat_19673215/article/details/94439676