mybatis spring during the integration arise, to identify the reasons is because there is no writing implement interface methods in UserMapperImpl in.
(Use UserMapperImpl of sqlSession property)
To achieve the following:
public class UserMapperImpl implements UserMapper { //添加sqlSession属性 private SqlSession sqlSession; public void setSqlSession(SqlSession sqlSession) { this.sqlSession = sqlSession; } public List<User> getUser() { UserMapper mapper = sqlSession.getMapper(UserMapper.class); return mapper.getUser(); } }