com.baomidou
mybatis-plus
3.1.1
第二步:在mapper接口上继承baseMapper:
public interface UserMapper extends baseMapper第三步:修改sqlSessionFactory:{ }
第四步:测试:
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:applicationContext.xml")
public class TestSpringMP {
@Autowired
private UserMapper userMapper;
@Test
public void testSelectList() {
List users = this.userMapper.selectList(null);
for (User user : users)
System.out.println(user);
}
测试结果:


