@Test public void testGetSqlSession() throws Exception { SqlSession sqlSession = MybatisUtil.getSqlSession(); Assert.assertNotNull(sqlSession); AuthorMapper authorMapper = sqlSession.getMapper(AuthorMapper.class); Assert.assertNotNull(authorMapper); authorMapper.getAllAuthors(); }
public static SqlSession getSqlSession() { return MybatisUtil.getSqlSessionFactory().openSession(); }
MybatisUtil { public static SqlSession getSqlSession() { return MybatisUtil.getSqlSessionFactory().openSession(); } }
MybatisUtil { public static SqlSession getSqlSession() { return MybatisUtil.getSqlSessionFactory().openSession(); }  }
MybatisUtil { public static SqlSession getSqlSession() { return MybatisUtil.getSqlSessionFactory().openSession(); }  static SqlSessionFactory getSqlSessionFactory(); static SqlSession getSqlSession(); }
MybatisUtil { public static SqlSession getSqlSession() { return MybatisUtil.getSqlSessionFactory().openSession(); }  static SqlSessionFactory getSqlSessionFactory(); static SqlSession getSqlSession();  }