@Test public void testSelectPostComment() throws Exception { PostComment postComment = postCommentService.selectPostComment(); Assert.assertNotNull(postComment); }
@Override public PostComment selectPostComment() { SqlSession sqlSession = null; try { sqlSession = MybatisUtil.getSqlSession(); PostCommentMapper postCommentMapper = sqlSession.getMapper(PostCommentMapper.class); return postCommentMapper.selectPostComment(); } finally { if (sqlSession != null) { sqlSession.close(); } } }
PostCommentServiceImpl implements PostCommentService { @Override public PostComment selectPostComment() { SqlSession sqlSession = null; try { sqlSession = MybatisUtil.getSqlSession(); PostCommentMapper postCommentMapper = sqlSession.getMapper(PostCommentMapper.class); return postCommentMapper.selectPostComment(); } finally { if (sqlSession != null) { sqlSession.close(); } } } }
PostCommentServiceImpl implements PostCommentService { @Override public PostComment selectPostComment() { SqlSession sqlSession = null; try { sqlSession = MybatisUtil.getSqlSession(); PostCommentMapper postCommentMapper = sqlSession.getMapper(PostCommentMapper.class); return postCommentMapper.selectPostComment(); } finally { if (sqlSession != null) { sqlSession.close(); } } }  }
PostCommentServiceImpl implements PostCommentService { @Override public PostComment selectPostComment() { SqlSession sqlSession = null; try { sqlSession = MybatisUtil.getSqlSession(); PostCommentMapper postCommentMapper = sqlSession.getMapper(PostCommentMapper.class); return postCommentMapper.selectPostComment(); } finally { if (sqlSession != null) { sqlSession.close(); } } }  @Override PostComment selectPostComment(); }
PostCommentServiceImpl implements PostCommentService { @Override public PostComment selectPostComment() { SqlSession sqlSession = null; try { sqlSession = MybatisUtil.getSqlSession(); PostCommentMapper postCommentMapper = sqlSession.getMapper(PostCommentMapper.class); return postCommentMapper.selectPostComment(); } finally { if (sqlSession != null) { sqlSession.close(); } } }  @Override PostComment selectPostComment();  }