3.게시판 구현에서 트랜잭션 처리 하시오.
@Transactional
@Override
public void registerBuser(BuserVO vo) {
log.info("registerBuser()..");
boardMapper.insertIntoBuser(vo);
}
@Transactional
@Override
public void writePost(BoardVO vo) {
log.info("writePost()..");
boardMapper.insertIntoBoard(vo);
}
@Transactional
@Override
public void addComment(CommentsVO vo) {
log.info("addComment()..");
boardMapper.insertIntoComments(vo);
}
@Transactional
@Override
public void deletePost(int pnumber) {
log.info("deletePost()..");
boardMapper.deletePostFromPnumber(pnumber);
}
@Transactional
@Override
public void viewUp(int pnumber, String buid) {
log.info("viewUp()..");
boardMapper.insertPostview(pnumber, buid);
}
@Transactional
@Override
public void phitUp(int pnumber, int phit) {
log.info("phitUp()..");
boardMapper.updateBoardPhit(pnumber, phit);
}
@Transactional
@Override
public void plikeUp(int pnumber, int plike) {
log.info("plikeUp()..");
boardMapper.updateBoardPlike(pnumber, plike);
}
@Transactional
@Override
public void likeUp(int pnumber, String buid) {
log.info("likeUp()..");
boardMapper.insertPostlike(pnumber, buid);
}