-
Notifications
You must be signed in to change notification settings - Fork 0
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
[feat] 카톡 로그인 기능 구현 #13
Conversation
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.
작업하시느라 고생하셨습니다!
전체적으로 record 적용 및 불필요한 코드 제거 작업만 해주시면 좋을 것 같습니다!
.gitignore
Outdated
application.yml |
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.
p3:
application.yml 파일을 커밋하지 않으려고 추가하신 것이라 생각드는데,
첫번째 라인을 보시면 src/main/resources/*.yml
으로 이미 추가가 안될 것이라 생각합니다..!
혹시 해당 라인이 없으면 application.yml 파일이 커밋이 되고 있을까요?
build.gradle
Outdated
id 'org.springframework.boot' version '3.0.12' | ||
id 'io.spring.dependency-management' version '1.1.3' |
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.
p3:
스프링 부트 버전을 바꾼 이유가 궁금합니다..!
build.gradle
Outdated
// jwt | ||
implementation group: "io.jsonwebtoken", name: "jjwt-api", version: "0.11.2" | ||
implementation group: "io.jsonwebtoken", name: "jjwt-impl", version: "0.11.2" | ||
implementation group: "io.jsonwebtoken", name: "jjwt-jackson", version: "0.11.2" |
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.
p3
해당 이슈에서는 jwt 기능이 없는 것으로 보입니다.
제거하면 좋을 것 같습니다
@ToString | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
|
||
public class KakaoUserResponse { | ||
|
||
private Long id; | ||
|
||
|
||
} |
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.
@ToString | |
@Getter | |
@NoArgsConstructor(access = AccessLevel.PRIVATE) | |
@AllArgsConstructor(access = AccessLevel.PRIVATE) | |
public class KakaoUserResponse { | |
private Long id; | |
} | |
@ToString | |
@Getter | |
@NoArgsConstructor(access = AccessLevel.PRIVATE) | |
@AllArgsConstructor(access = AccessLevel.PRIVATE) | |
public record KakaoUserResponse(Long id) { | |
} |
p3
java 17 부터는 record를 사용해서 표현할 수 있습니다!
record를 통해 위 어노테이션을 전부 없앨 수 있습니다
참고해주세요
@ToString | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
|
||
public class KakaoAccessTokenResponse { | ||
|
||
private String accessToken; | ||
private String refreshToken; | ||
|
||
public static KakaoAccessTokenResponse of(String accessToken, String refreshToken) { | ||
return new KakaoAccessTokenResponse(accessToken, refreshToken); | ||
} | ||
} |
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.
p3:
해당 코드도 record를 적용하면 좋을 것 같습니다
|
||
|
||
|
||
|
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.
p2
불필요한 공백인 것 같아 보입니다!
public static SocialLoginResponse of(String userId) { | ||
return new SocialLoginResponse( | ||
userId = userId | ||
); | ||
} |
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.
p3
record 타입이기 때문에 of 를 사용하지 않아도 new SocialLoginResponse("string") 을 통해 할 수 있다고 생각합니다..!
혹시 of 를 사용한 이유가 있을까요?
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 record SocialLoginRequest( | ||
String code | ||
) { | ||
|
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.
P4:
요런 빈공백들도 없애면 좋을거 같아요!
@Getter | ||
@RequiredArgsConstructor(access = AccessLevel.PRIVATE) | ||
public enum SocialPlatform { | ||
KAKAO("카카오"), |
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.
P4:
enum 작성할때 KAKAO("카카오");
이렇게 끝낼 수 있나요..? (갑자기 enum 작성 이렇게 해도 되는지 까먹음 이슈)
SocialPlatform 카카오 말고 더 안쓰니까 KAKAO("카카오");
이렇게 할 수 있으면 바꾸면 좋을거 같아요!
관련 이슈번호
해결하는 데 얼마나 걸렸나요? (예상 작업 시간 / 실제 작업 시간)
해결하려는 문제가 무엇인가요?
일단 코드가 많이 안 바뀔 거 같아서 일단 merge 하겠습니다!