Commit 9ccd6ac
feat: community-comment 생성 기능 (#67)
* test(community): communityComment 생성 기능 테스트 작성
* feat(community): communityComment Entity, Repository 추가
* feat(community): communityComment 생성 RequestDto, Usecase 추가 및 Service 구현
* refactor(community): CommunityBoardRepository 네이밍 변경
* refactor(community): community board/comment 폴더 구조 변경
* chore(community): 불필요한 import 및 public 키워드 제거
* Feature/36 s3 이미지 업로드 기능 구현 (#66)
* feat: 이미지 업로드 기능 구현
- aws s3 연동을 위한 의존성 추가
- 환경변수 추가
- S3 연결을 위한 config 클래스 구현
- 서비스 레이어에 이미지 업로드 기능 구현
- 업로드 실패 예외와 예외 메세지 추
- test.yml에 테스트에 필요한 환경변수 추가
- 테스트 코드 작성및 검증 완료
* chore: 환경변수 추가
- cicd workflow 에 이미지 업로드 관련 환경변수 추가
- appication.yml에 이미지 업로드 관련 환경변수 이름 변경
* feat: 이미지 파일 검증 기능 구현
- 이미지 크기를 8MB로 제한
- 이미지의 크기 초과를 검증하는 기능 구현
- 이미지의 확장자명을 검증하는 기능 구현
- 이미지 업로드시 검증 기능들을 수행하도록 수정
- 전역 예외처리 핸들러에 이미지 업로드 예외 추가
- 예외 메세지 추가
- 테스트 코드 작성및 검증 완
* fix: 코드 리뷰 사항 반영
- BASE_URL을 S3_BASE_URL라는 더 명시적인 이름으로 변경
- ImageUploadUtils private 생성자의 예외처리 메세지를 ExceptionMessage에 등록하여 사용하도록 수정
- 이미지 업로드 메서드의 내부 기능을 메서드로 추출하여 가독성 향상
- ImageUploadUtils의 일부 기능의 접근 제어자를 private으로 수정
- 테스트 코드의 when, then을 더 명확하게 분
* test(community): 커뮤니티 댓글 생성 테스트 추가
- repository 테스트에 findById 테스트 추가
- service 테스트에 대댓글 예외 테스트 추가
* chore(community): 소문자로 네이밍 변경
* fix(community): 커뮤니티 댓글 생성 requestDto 수정
- parentCommentId Dto 필드로 수정
* feat(community): 커뮤니티 댓글 생성 예외 처리 및 메세지 추가
* refactor(community): 코드 리뷰 사항 반영
- ServiceTest 오타 수정
- validateParentCommentExists 메서드 추출
* test(community): communityComment 생성 기능 테스트 작성
* feat(community): communityComment Entity, Repository 추가
* feat(community): communityComment 생성 RequestDto, Usecase 추가 및 Service 구현
* refactor(community): CommunityBoardRepository 네이밍 변경
* refactor(community): community board/comment 폴더 구조 변경
* chore(community): 불필요한 import 및 public 키워드 제거
* test(community): 커뮤니티 댓글 생성 테스트 추가
- repository 테스트에 findById 테스트 추가
- service 테스트에 대댓글 예외 테스트 추가
* chore(community): 소문자로 네이밍 변경
* fix(community): 커뮤니티 댓글 생성 requestDto 수정
- parentCommentId Dto 필드로 수정
* feat(community): 커뮤니티 댓글 생성 예외 처리 및 메세지 추가
* refactor(community): 코드 리뷰 사항 반영
- ServiceTest 오타 수정
- validateParentCommentExists 메서드 추출
* feat(community): 커뮤니티 댓글 존재 여부 메서드 및 테스트 추가
* chore(community): 불필요한 import 제거
---------
Co-authored-by: seojin Yoon <[email protected]>1 parent 0be3598 commit 9ccd6ac
File tree
27 files changed
+440
-62
lines changed- src
- main/java/com/somemore
- community
- domain
- dto/request
- repository
- board
- comment
- service
- board
- comment
- usecase
- board
- comment
- domains
- global/exception
- test/java/com/somemore/community
- repository
- service
- board
- comment
27 files changed
+440
-62
lines changedLines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments