Skip to content
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

[review] f1-washpedia #144

Open
wants to merge 24 commits into
base: refactor/review
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ddd61fb
feature: 만약 버전은 어떻게 관리할 수 있을까 ?
YunNote Feb 17, 2024
c2a17d0
feature: 바로 return
YunNote Feb 17, 2024
f1d0672
feature: true만씀
YunNote Feb 17, 2024
07cb76d
feature: 사용하지 않음
YunNote Feb 17, 2024
c4e1569
feature: Objects 클래스 사용
YunNote Feb 17, 2024
19a24d0
feature: Objects 클래스 사용
YunNote Feb 17, 2024
c90f43c
feature: 오탈자
YunNote Feb 17, 2024
82db412
feature: 복수형으로 작성되어야 할듯
YunNote Feb 17, 2024
e0fcb63
feature: Pageable 에 대해서 직접 class 로 구현하여 사용해보시는건 어떨까요
YunNote Feb 17, 2024
1fc0f4e
feature: 미사용 메서드 제거
YunNote Feb 17, 2024
060196a
feature: Response 네이밍
YunNote Feb 17, 2024
5af31d2
feature: API url 복수형. 미사용 서비스 제거, mypage가 필요한지?
YunNote Feb 17, 2024
44918ee
feature: 고정된 response에 대해서 class로 반환하는건 어떨까요?
YunNote Feb 17, 2024
4d7d388
feature: 비밀번호에 대한 Validation 처리
YunNote Feb 17, 2024
789b0cb
feature: Mapper의 활용은 ?
YunNote Feb 17, 2024
927b0e7
feature: config설정은 따로 패키지에 분리
YunNote Feb 17, 2024
3afa661
feature: dto 명칭 대신 request, String 대신 Enum을 받아버림
YunNote Feb 17, 2024
dd9617a
feature: 정적 팩토리 메서드
YunNote Feb 17, 2024
e90ba9f
feature: 정적 팩토리 메서드
YunNote Feb 17, 2024
c4daa01
feature: null에 대한 여러가지 처리
YunNote Feb 17, 2024
d3cd247
feature: 전반적인 Validation 처리 필요
YunNote Feb 17, 2024
a4773a2
feature: 전체리스트 조회와, search를통한 조회 결과같이 항상 같은방향으로 개발이 되는지?
YunNote Feb 17, 2024
71676fa
feature: 컬럼
YunNote Feb 17, 2024
242c2f1
feature: 컬럼
YunNote Feb 17, 2024
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 @@ -20,8 +20,12 @@
public class CommonCodeController {

private final CommonCodeService commonCodeService;

//
Copy link
Author

Choose a reason for hiding this comment

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

만약 버저닝을 해야한다면 어떻게 관리할 수 있을까요?
URL로도 관리할 수 있지만 header를 통해서도 관리하는 방법에 대해 보시면 좋을것 같습니다!

@GetMapping("/{codeName}")
public ResponseEntity<ApiResponse<List<CommonCodeDto>>> getCommonCode (@PathVariable String codeName){

//
List<CommonCodeDto> codes = commonCodeService.getCodes(codeName);
Copy link
Author

Choose a reason for hiding this comment

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

반환타입을 저장하는 변수를 만드는것도 좋지만 사용처가 없다면 바로 return 문에 넣어주는것은 어떨까요 ?return
ApiResponse.toResponseEntity(GET_COMMON_CODE_SUCCESS, commonCodeService.getCodes(codeName));


return ApiResponse.toResponseEntity(GET_COMMON_CODE_SUCCESS, codes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class CommonCodeService {

public List<CommonCodeDto> getCodes(String codeName) {

//
return commonCodeRepository.findAllByUpperNameAndIsUsed(codeName,true)
Copy link
Author

Choose a reason for hiding this comment

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

항상 true만 반환하는데 spring data jpa 에서 제공하는 true를 그냥 써도 될것같습니다!

참고 사이트 전달드립니다

.stream()
.map(CommonCodeDto::from)
Expand Down