-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[로니] 스프링 카페 6단계 - 댓글 #147
Open
CMSSKKK
wants to merge
12
commits into
codesquad-members-2022:cmsskkk
Choose a base branch
from
CMSSKKK:step6
base: cmsskkk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[로니] 스프링 카페 6단계 - 댓글 #147
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SessionUser, ArticleUpdateDto 구현 equals 메서드 수정 Article 생성자 팩토리 메서드로 수정
댓글 기능 구현을 위한 domain 구현 schema.sql에 cafe_reply table 생성 ddl 작성
HttpSesion에 담긴 user 정보를 담는 모델 구현 기존 UserResponseDto로 담았던 로직을 수정
Reply를 DB에 저장하는 로직을 구현
ArticleController에 ReplyService 필드 추가 qna/show.html에 reply 정보를 출력하도록 수정
ReplyRepository.hasReplyOfAnotherWriter() 메서드 구현 ReplyService.isDelatableArticle() 메서드 구현 ArticleController.checkDeletable() 메서드 구현 SessionUser 수정하지 못하고 빼먹은 부분 수정 MvcConfig addInterceptors 댓글 작성 ,삭제 url pathPattern 추가
data.sql reply의 foreign key로 인해서 테스트를 위한 article insert query 2개 작성
reply 수정 로직을 구현했으나, 실제로 화면에 보이기위해서는 softDeletion이나 다른 필드가 필요할 것 같아서 연결하지는 못하였음 DB 쿼리도 변경이 필요할 것 같아서, 다음단계에서 구현을 목표로 함.
ReplyDto 삭제에 따른 컨트롤러 서비스 수정
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
안녕하세요! 로니입니다.
기능 구현사항
궁금한 점
Exception
을 현재ClientException
으로 하나만 구현해서, 사용자가 잘못된 요청을 했을 시에 상태코드와 메시지를 그때그때 담아서 처리하고 있습니다. 조금 더 세분화가 필요할까요? 그리고 상태코드와 메시지를enum
으로 담아서 재사용하는 것이 좋을까요??로그인 여부에 따라서 기능 사용을
Interceptor
를 구현해서, 처리하고 있는데 각각의 url을 interceptorTest를 통해서 하나로 모아서 테스트하는 것이 더 좋을까요? 아니면 각각의 controllerTest에서 로그인정보 여부를 체크해서 성공, 실패 테스트를 각각 만드는 것이 더 좋을까요?