Skip to content

[1주차] 영화 목록 조회 API#25

Open
jmParkGit wants to merge 17 commits intohanghae-skillup:mainfrom
jmParkGit:main
Open

[1주차] 영화 목록 조회 API#25
jmParkGit wants to merge 17 commits intohanghae-skillup:mainfrom
jmParkGit:main

Conversation

@jmParkGit
Copy link

[1주차] 영화 목록 조회 API

작업 내용

  • 영화 목록 조회 API 구현
  • JPA를 이용하여, mysql과 연동

발생했던 문제와 해결 과정을 남겨 주세요.

문제1

  • 문제: mysql container사용시, 접속권한 에러가 발생함.
  • 해결방법: local에 설치되어 있던 mysql 사용하여 사용(container mysql은 추후 Debug)

이번 주차에서 고민되었던 지점이나, 어려웠던 점을 알려 주세요.

  • spring과 sql을 연동하기 위한 환경셋팅

리뷰 포인트

기타 질문

@pyuseon
Copy link
Contributor

pyuseon commented Jan 12, 2025

안녕하세요
1주차 리뷰를 진행하게된 박유선입니다.
첫주차 과제하시느라 고생 많으셨습니다!


@LastModifiedDate
private LocalDateTime modifiedAt;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

작성자와 수정자를 같이 넣어 주시면 요구사항을 만족하고 중복 코드를 줄일 수 있습니다.

@GeneratedValue(strategy = GenerationType.AUTO)
@Id
private Long id;

Copy link
Contributor

Choose a reason for hiding this comment

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

GenerationType을 Auto로 설정한 이유가 있으실까요?
id의 경우는 지금은 Long 으로 설정되어 있고 ddl설정도 auto라서 이대로 실행시에 bigint로 컬럼이 지정될텐데요.
id는 음수값이 들어가면 안되므로 unsigned bigint로 설정 되도록 조정하시는 것이 좋을 것 같습니다.

public List<Movie> getMovies() {
return movieRepository.findAll();
}

Copy link
Contributor

@pyuseon pyuseon Jan 12, 2025

Choose a reason for hiding this comment

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

1주차에는 상영중인 영화만을 리턴하는 것이 요구사항이었습니다. 이 부분은 구현 중이실까요?
api는 Restful 하게 구현하시려는 의도가 보입니다! 고생하셨습니다.


@Column
private List<String> screeningSchedule;

Copy link
Contributor

Choose a reason for hiding this comment

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

상영 스케줄은 따로 테이블로 빼서 관리하시는 것이 좋을 것으로 보입니다.
상영 스케줄에 시작시간과 종료 시간같은 정보가 같이 들어가야 합니다.
위의 상영관을 따로 테이블로 빼고 상영관관 상영 스케줄을 연결 시키는 것은 어떨까요?


@Column(nullable = false)
private String releaseDate;

Copy link
Contributor

Choose a reason for hiding this comment

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

date는 타입을 LocalDate로 지정하시면 관리가 수월 할 것 같습니다.


@Column(nullable = false)
private String runningTime;

Copy link
Contributor

Choose a reason for hiding this comment

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

러닝 타임은 분으로 저장하므로 int로 설정해 보세요!

@pyuseon
Copy link
Contributor

pyuseon commented Jan 12, 2025

좋았던 점

  • 초기 세팅 단계부터 ReadMe를 작성해 주셨네요. 고생 많으셨습니다! 프로젝트의 ReadMe는 첫인상을 좌우하는 중요한 요소로, 이부분도 신경써 주신 점 이 좋네요.

아쉬운 점

  • 현재는 초기 세팅 단계라 리뷰 할 부분이 많지는 않았습니다. 앞으로 구현을 진행하시면서 궁금한 점이 생기면 PR에 멘션을 남겨주세요. 답변 드리겠습니다. 😄
  • 아직 모듈 분리가 이루어지지 않은 상태인데, 현재의 설계된 내용을 기준으로 API 단위부터 모듈을 분리해 보실 것을 추천드립니다.
  • 연습 프로젝트라 하더라도 Git 브랜치 관리에 신경을 써주시면 프로젝트 완성도가 더욱 높아질 것입니다. 주차별로 동일한 브랜치를 사용하는 경우, 나중에 수정하거나 버전을 관리할 때 문제가 발생할 수 있습니다. main이나 develop 브랜치에서 각 작업별로 새로운 브랜치를 생성해 관리하는 방식을 추천드립니다.

추가 리뷰 포인트

  • 이번 주차는 설계를 진행하며 멀티 모듈 구성을 해야 하는 주차라 부담이 크셨을 것 같습니다. 이렇게 과제를 올려주신 점 감사합니다.
  • 설계 단계부터 차근차근 시작하시면 끝까지 구현해내실 수 있을 겁니다. 응원하겠습니다! 💪

@phyeran phyeran changed the base branch from main to jmParkGit January 17, 2025 01:55
@spartacontents spartacontents deleted the branch hanghae-skillup:main January 17, 2025 03:20
@phyeran phyeran changed the base branch from jmParkGit to main January 19, 2025 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants