김태영 API 구축 코드#1
Open
tae0u0 wants to merge 3 commits intoGDSC-PKNU-Official:mainfrom
Open
Conversation
mjj111
approved these changes
Jun 23, 2024
| @@ -0,0 +1,20 @@ | |||
| <!DOCTYPE HTML> | |||
| import java.util.*; | ||
|
|
||
| @Repository | ||
| public class MemoryUserRepository implements UserRepository { |
Member
There was a problem hiding this comment.
임시로 메모리기반 레파지토리를 구현하셨군요! 기발하네요 ㅎㅎㅎ
| private String loginId; | ||
| private String password; | ||
|
|
||
| public String getName() { |
Contributor
There was a problem hiding this comment.
헉! 사용하지 않는 게터 세터를 모두 둔다면 객체가 외부에서 쉽게 보여지고, 수정될 수 있는 위험이 있기도 합니다~
| public class UserController { | ||
| private final UserService userService; | ||
|
|
||
| @Autowired |
coke98
reviewed
Jun 23, 2024
Contributor
coke98
left a comment
There was a problem hiding this comment.
LGTM 고생하셨습니다! 결과물도 노션으로 링크 남겨주시면 확인해볼 수 있도록 하겠습니다~!
| public class Fortune { | ||
| private String fortune; | ||
| String[] list = { | ||
| "매우 좋음", |
| @@ -0,0 +1,5 @@ | |||
| package com.example.GDSC.model; | |||
|
|
|||
| public enum Grade { | |||
| private String password; | ||
| private Grade grade; | ||
|
|
||
| public User(){ |
Contributor
There was a problem hiding this comment.
기본 생성자가 필요한 이유, 그리고 해당 코드에서 명시해야하는 이유가 무엇일까요? 세찬님 PR에도 남겨뒀으니 참고해보셔도 좋을 듯 합니다. 답변 남겨주시면 확인하겠습니다~!
| private String loginId; | ||
| private String password; | ||
|
|
||
| public String getName() { |
Contributor
There was a problem hiding this comment.
헉! 사용하지 않는 게터 세터를 모두 둔다면 객체가 외부에서 쉽게 보여지고, 수정될 수 있는 위험이 있기도 합니다~
|
|
||
| import java.util.Optional; | ||
| import java.util.List; | ||
| public interface UserRepository { |
Author
깃허브에 노션 링크를 남기는 거였군요.. 하단에 해당 노션 링크 남겨놨습니다! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
UserController를 통해 회원 가입 및 조회, 전체 회원 조회 구현
FortuneController를 통해 GET 요청 시 그날의 운세 전달