[Spring MVC] 박시원 미션 제출합니다.#504
Open
8parks wants to merge 2 commits into
Open
Conversation
juanxiu
reviewed
Oct 6, 2025
juanxiu
left a comment
There was a problem hiding this comment.
미션하느라 고생하셨습니다! 전반적으로 잘 구성하였습니다. 리뷰 답글 부탁드립니다~
| private List<Reservation> reservations = new ArrayList<>(); | ||
|
|
||
| public ReservationController() { | ||
| reservations.add(new Reservation(1L, "브라운", "2023-01-01", "10:00")); |
There was a problem hiding this comment.
add()로 초기 데이터를 넣으면 리스트가 mutable 상태가 됩니다.
테스트용 고정 데이터라면 List.of()로 불변 리스트로 선언해도 좋을 것 같아요. 선택은 자유입니다. 혹시 가변 리스트 생성을 한 특별한 이유가 있을까요?
Author
There was a problem hiding this comment.
아하 감사합니다! 특별한 이유는 따로 없고, List.of()으로 쓰는 것을 생각하지 못했습니다..ㅎㅎ 개인적으로 ArrayList가 제일 익숙하기도 하고 직전에 컨트롤러 CRUD 실습을 했어서 ArrayList로 그냥 자연스럽게 썼던 것 같아요. 다음에는 이런 부분도 더 신경 써보겠습니다!!
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.
2025.10.04. 1주차 과제
1단계 - 홈 화면
2단계 - 예약 조회