From 23a4824f691917dbb15fe42e76f853bd57062a87 Mon Sep 17 00:00:00 2001 From: joonghyun Date: Mon, 21 Nov 2022 20:40:04 +0900 Subject: [PATCH] #31 Refactor: Modify BoardService --- .../java/umc/crud/src/board/BoardService.java | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/src/main/java/umc/crud/src/board/BoardService.java b/src/main/java/umc/crud/src/board/BoardService.java index 89e88af..c5f4a3a 100644 --- a/src/main/java/umc/crud/src/board/BoardService.java +++ b/src/main/java/umc/crud/src/board/BoardService.java @@ -7,34 +7,18 @@ import umc.crud.config.BaseResponseStatus; import umc.crud.src.board.model.*; -import java.util.List; @Service public class BoardService { @Autowired - BoardDao boardDao; + private BoardDao boardDao; - /** - * 모든 글 조회 - * @return - */ - public List getAllBoards() { - - return boardDao.getAllBoards(); - } - - /** - * 특정 글 조회 - * @param writer - * @return - */ - public List getBoardByWriter(String writer) { - - return boardDao.getBoardByWriter(writer); - } + @Autowired + private BoardProvider boardProvider; /** * 글 생성 + * POST * @param postBoardReq * @return * @throws BaseException @@ -52,6 +36,7 @@ public PostBoardRes writeBoard(PostBoardReq postBoardReq) throws BaseException{ /** * 글 내용 수정 + * PUT * @param putBoardReq * @throws BaseException */ @@ -69,6 +54,7 @@ public void modifyContent(PutBoardReq putBoardReq) throws BaseException { /** * 글 삭제 + * DELETE * @param boardId */ @Transactional