@Test public void testGetAllBlog() throws Exception { List<Blog> blogList = blogService.getAllBlog(); Assert.assertNotNull(blogList); }
@Override public List<Blog> getAllBlog() { SqlSession sqlSession = null; try { sqlSession = MybatisUtil.getSqlSession(); BlogMapper blogMapper = sqlSession.getMapper(BlogMapper.class); return blogMapper.getAllBlog(); } finally { if (sqlSession != null) { sqlSession.close(); } } }
BlogServiceImpl implements BlogService { @Override public List<Blog> getAllBlog() { SqlSession sqlSession = null; try { sqlSession = MybatisUtil.getSqlSession(); BlogMapper blogMapper = sqlSession.getMapper(BlogMapper.class); return blogMapper.getAllBlog(); } finally { if (sqlSession != null) { sqlSession.close(); } } } }
BlogServiceImpl implements BlogService { @Override public List<Blog> getAllBlog() { SqlSession sqlSession = null; try { sqlSession = MybatisUtil.getSqlSession(); BlogMapper blogMapper = sqlSession.getMapper(BlogMapper.class); return blogMapper.getAllBlog(); } finally { if (sqlSession != null) { sqlSession.close(); } } }  }
BlogServiceImpl implements BlogService { @Override public List<Blog> getAllBlog() { SqlSession sqlSession = null; try { sqlSession = MybatisUtil.getSqlSession(); BlogMapper blogMapper = sqlSession.getMapper(BlogMapper.class); return blogMapper.getAllBlog(); } finally { if (sqlSession != null) { sqlSession.close(); } } }  @Override Blog getBlogWithPosts(); @Override Blog getBlogWithPostsNested(); @Override Blog getBlogOneToOne(); @Override List<Blog> getAllBlog(); }
BlogServiceImpl implements BlogService { @Override public List<Blog> getAllBlog() { SqlSession sqlSession = null; try { sqlSession = MybatisUtil.getSqlSession(); BlogMapper blogMapper = sqlSession.getMapper(BlogMapper.class); return blogMapper.getAllBlog(); } finally { if (sqlSession != null) { sqlSession.close(); } } }  @Override Blog getBlogWithPosts(); @Override Blog getBlogWithPostsNested(); @Override Blog getBlogOneToOne(); @Override List<Blog> getAllBlog();  }