Skip to content

Conversation

corjqnrl
Copy link

@corjqnrl corjqnrl commented Oct 3, 2025

1단계 - 홈 화면
2단계 - 예약 조회

Copy link

@juanxiu juanxiu left a 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) {
Copy link

Choose a reason for hiding this comment

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

long 과 Long 타입은 달라요 long은 기본형, Long 은 객체형입니다. 둘의 차이는 이 글을 참고하면 좋을 것 같네요!

Copy link
Author

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() {
Copy link

Choose a reason for hiding this comment

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

지금은 모델에 아무 데이터도 넣지 않고 있어요. Model에 리스트를 담아서 전달해야 합니다.

Copy link
Author

Choose a reason for hiding this comment

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

모델에 리스트를 담아 전달하도록 수정했습니다

}

@GetMapping("/reservations")
@ResponseBody
Copy link

Choose a reason for hiding this comment

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

예약 목록 조회 API 컨트롤러를 잘 만들었습니다~

Copy link
Author

Choose a reason for hiding this comment

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

코드 리뷰 감사합니다!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants