public class MapperTest {
@Autowired
private SqlSession sqlSession;
@Test
public void testMapper() throws Exception{
SingerMapper mapper = sqlSession.getMapper(SingerMapper.class);
List<Singer> singers = mapper.allSinger();
Ps:Although I know that I can directly inject the Singermapper to test, I still want to know how to use SQLSession to implement this~~