-
Notifications
You must be signed in to change notification settings - Fork 164
[Spring MVC] 김남우 미션제출합니다 #502
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
base: corjqnrl
Are you sure you want to change the base?
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.
미션하느라 고생하셨습니다 :) 리뷰 참고해서 다시 푸시해주세요!
| private String date; | ||
| private String time; | ||
|
|
||
| public Reservation(long id, String name, String date, String time) { |
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.
long 과 Long 타입은 달라요 long은 기본형, Long 은 객체형입니다. 둘의 차이는 이 글을 참고하면 좋을 것 같네요!
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.
long은 원시 타입으로 값이 null이 될 수 없고 Long은 참조 타입이기 때문에 null 할당이 가능하다는 점, 그리고 id 값은 not null이 보장되지 않아 Long 타입을 사용해야 한다는 점을 참고해서 수정하였습니다!
| private List<Reservation> reservations = new ArrayList<>(); | ||
|
|
||
| @GetMapping("/reservation") | ||
| public String reservation() { |
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.
지금은 모델에 아무 데이터도 넣지 않고 있어요. Model에 리스트를 담아서 전달해야 합니다.
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.
모델에 리스트를 담아 전달하도록 수정했습니다
| } | ||
|
|
||
| @GetMapping("/reservations") | ||
| @ResponseBody |
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.
예약 목록 조회 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.
코드 리뷰 감사합니다!!
1단계 - 홈 화면
2단계 - 예약 조회