Skip to content
Open
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
5d1b20c
init commit
eugene225 Nov 20, 2023
e67814f
Chore : 프로젝트 환경설정
eugene225 Nov 20, 2023
71f3790
Feat : entity 생성 - User, Post
eugene225 Nov 20, 2023
3bc557b
Fix : 연관관계 매핑 오류 해결
GiHoo Nov 20, 2023
b0c5ecb
Feat : Post 관련 Dto 구현
GiHoo Nov 21, 2023
426d642
Feat : PostRepository 구현
GiHoo Nov 21, 2023
7fbe52e
Refactor : 사용하지 않는 애노테이션 제거
GiHoo Nov 21, 2023
91b8736
Feat : UserRepository 구현
GiHoo Nov 21, 2023
ec97bec
Feat : UserDto 구현
GiHoo Nov 21, 2023
5f485c8
Feat : PostService 구현
GiHoo Nov 21, 2023
462b862
Feat : PostController 구현
GiHoo Nov 21, 2023
1c49847
Refactor : PostDto에 UserDto 추가
GiHoo Nov 21, 2023
bc065c9
Feat : setUser, update 메서드 추가
GiHoo Nov 21, 2023
f4d7a9b
Feat : Converter 구현
GiHoo Nov 21, 2023
afa8a7d
Refactor : update Api 수정
GiHoo Nov 21, 2023
8bfc7d2
Test : PostService 테스트
GiHoo Nov 21, 2023
ff17326
Feat : ApiReponse 생성 및 postController 적용
eugene225 Nov 22, 2023
95e91f8
Chore : restdocs 플러그인 추가
eugene225 Nov 22, 2023
d15af2a
Test : PostController 테스트 및 문서화 작업
eugene225 Nov 22, 2023
33b67e2
Feat : GlobalExceptionHandler 구현
eugene225 Nov 22, 2023
c008314
Docs : api 문서화
eugene225 Nov 22, 2023
268882d
Feat : postController ApiResponse 적용
eugene225 Nov 22, 2023
cc0e870
Test : findById 실패 테스트 추가
GiHoo Nov 23, 2023
63ed5a5
1차 피드백 수정
GiHoo Dec 3, 2023
35628e6
1차 피드백 수정
GiHoo Dec 3, 2023
b01f6ed
Refactor: HTTP 메서드 변경 (POST -> PUT)
GiHoo Dec 4, 2023
57127d9
Refactor: create를 위한 로직 수정(dto 생성 및 converter 추가)
GiHoo Dec 4, 2023
4cafb55
Refactor: update를 위한 로직 수정(null 체크)
GiHoo Dec 4, 2023
f6a301b
Refactor: update를 위한 로직 수정
GiHoo Dec 4, 2023
0b112f1
Remove: ApiResponse 제거
GiHoo Dec 5, 2023
0f91afa
Refactor : ApiResponse -> ResponseEntity 변경
GiHoo Dec 5, 2023
6599c3c
Refactor : @RequiredArgsConstructor 로 변경
GiHoo Dec 5, 2023
bdda4e9
Test: 변경한 Dto 반영
GiHoo Dec 5, 2023
055fdd0
Test: 변경한 Dto 반영
GiHoo Dec 5, 2023
71d2f67
Docs: Test를 위한 환경 설정 추가
GiHoo Dec 5, 2023
226bcac
Refactor: BaseEntity abstract class 변경
GiHoo Dec 5, 2023
2068b99
Feat: CustomException 생성
eugene225 Dec 6, 2023
100260e
Refactor: CustomException 적용
eugene225 Dec 6, 2023
e4bc9c1
Refactor: CustomException 적용
eugene225 Dec 6, 2023
bd2b1ca
Refactor: update 로직 변경
eugene225 Dec 6, 2023
858c1ac
Comment: 1차 코드리뷰 주석 삭제
eugene225 Dec 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ public User(String name, String hobby, int age) {
}

private void validateNull(String input) {
if(input.isEmpty() || input.isBlank()) throw new NullPointerException("NPE");
if(input.isEmpty() || input.isBlank()) throw new IllegalArgumentException("값을 입력 해야 합니다.");
}

private void validateAge(int age) {
if(age <= 0 || age >= 200) throw new NullPointerException("NPE");
if(age <= 0 || age >= 200) throw new IllegalArgumentException("나이는 1~199세 사이의 값 이어야 합니다.");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

관련 검증을 Age 자체에 넘길 수 있도록 값객체로 선언할 수 있을 것 같아요.
나중에 고민해보시면 좋을 것 같아요 👍

}

}