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.
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
Feature/soeunuhm step1 #2
base: soeunuhm
Are you sure you want to change the base?
Feature/soeunuhm step1 #2
Changes from 1 commit
73befb0
a3066af
49ec5a6
d098e1f
eec41fb
4481ff0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 엔티티에 @Setter 어노테이션을 지양하는 편이에요! public으로 객체를 마음대로 조작하는 것보다는 필요한 경우에 public update 메서드를 쓰면 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ddl 문을 따로 정의하지 않고 auto-ddl 옵션을 사용하시는 것 같은데 index 는 필요 없을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit]
아마도 사용자의 이름을 의미하는 것 같은데 보통 userId 와 username 모두 우리가 "아이디"라고 부르는 것을 지칭할 때 사용되는 것 같고(로그인용 식별자) 이름은 그냥 name 이라고 저장해도 될 것 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
필수적인건 아니지만 UserResponse 같은 dto를 만들어서 리턴해주면 어떨까싶어요! 멤버를 조회하는 api 만들 때 활용도 높을 것 같습니당 +_+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
프론트까지 만들어주셔도 괜찮긴 하지만 이후 step 들까지 프론트를 만들긴 어려우니까 그냥 api-server 의 형태로만 구현해도 될 것 같아요. 따로 view controller 를 사용하신 이유가 있으신가요? 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오타난듯..!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public 수준의 @Setter를 쓸거면 @AllArgsConstructor 사용하는 것도 추천해요!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
보안과 관련된 코드는 auth 라는 패키지(폴더)로 따로 빼도 괜찮을 것 같아요. user 에 관한 정보긴 하지만 비즈니스 도메인 로직과 함께 있을 필요는 없는 것 같아서요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
우리의 프로젝트에서는 큰 상관이 없겠지만 관리자의 계정의 id 를 "admin", "administrator", "root" 등과 같이 뻔한 것으로 짓는건 보안적으로 금기긴 합니다. 더 자세한 이유는 한번 찾아보셔도 좋을 것 같아요~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
사용자의 ROLE 을 id 를 보고 판단하면 새로운 관리자가 추가될 때마다 코드를 고쳐줘야 할 것 같은데 비효율적이지 않을까요? 지금은 어드민 아니면 모두 일반 유저지만 만약에 중간에 어드민보다는 조금 낮은 권한의 ROLE 을 만들어야 한다면 어떻게 처리하는게 좋을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이것 역시 크게 문제되는 코드는 아니지만 요즘 자바에서는 setter 대신 builder pattern 이나 constructor 를 사용하는 추세로 가고 있습니다. 많은 차이점이 있지만 가장 큰 이유는 immutable object 를 생성하기 위함인데 이것도 한번 찾아보시는 것 추천드려요!
간단한 답변이 있는 링크