MyBatis的Mapper接口以及XXExample的实例函数简单说明
一、mapper接口中的方法解析
二、example实例解析
mybatis的逆向工程中会生成实例及实例对应的example,example用于添加条件,相当where后面的部分
xxxExample example = new xxxExample();
Criteria criteria = new Example().createCriteria();
三、应用举例
① selectByPrimaryKey()
User user = XxxMapper.selectByPrimaryKey(10
转载
2020-10-14 14:44:56 ·
254 阅读 ·
0 评论