Skip to content

Conversation

@Immmii
Copy link

@Immmii Immmii commented Oct 25, 2025

시험 + 책임 분리 단계에서 뜯어고칠 코드 많음 이슈로 과제 진행도가 미흡합니다...
최대한 스터디 전까지 완료하겠습니다..!

Copy link

@danaggero danaggero left a comment

Choose a reason for hiding this comment

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

너무 수고 많으셨습니다!!

}

//==생성 메서드=//
public static OrderEntity createOrder(Long memberId, Long cinemaId, OrderFoodEntity... items) {

Choose a reason for hiding this comment

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

이런식으로 여러 개의 인자를 받을 수도 있군요..

.orElseThrow(null);
return Cinema.from(cinema);
}
} No newline at end of file

Choose a reason for hiding this comment

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

읽기 전용 클래스를 분리하셨네요! 확장성과 책임분리 측면에서 좋은 설계인 것 같습니다!

Choose a reason for hiding this comment

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

Reader 클래스에는 트랜잭션 ReadOnly를 true로 설정해야 할까요?

Copy link

Choose a reason for hiding this comment

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

saver, reader로 분리할 생각을 못했네요. 제가 아직 책임분리 코드 작성을 못했는데 참고해보겠습니다!

@Transactional(readOnly = true)
public class FavoriteCinemaService {

private FavoriteCinemaReader favoriteCinemaReader;

Choose a reason for hiding this comment

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

final 키워드가 누락된 것 같아요!

favoriteMovieRepository.delete(new FavoriteMovieEntity(memberId, movieId));
}

} No newline at end of file

Choose a reason for hiding this comment

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

여기도 Transactional 처리가 필요할 것 같아요!

Copy link

@junilyy junilyy left a comment

Choose a reason for hiding this comment

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

시험 기간인데 고생많으셨습니다!

Comment on lines +7 to +13
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Component
public @interface ExplainError {
String value() default "";
}
Copy link

Choose a reason for hiding this comment

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

어노테이션을 직접 정의하신건가요? 혹시 어디에 이용되는지 알 수 있을까요

Comment on lines +20 to 21
CinemaEntity cinemaEntity = cinemaRepository.findById(id)
.orElseThrow(() -> new IllegalArgumentException("영화관을 찾을 수 없습니다. id=" + id));
Copy link

Choose a reason for hiding this comment

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

얘만 IllegalArgumentException로 따로 처리하는 이유가 있나요??

.orElseThrow(null);
return Cinema.from(cinema);
}
} No newline at end of file
Copy link

Choose a reason for hiding this comment

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

saver, reader로 분리할 생각을 못했네요. 제가 아직 책임분리 코드 작성을 못했는데 참고해보겠습니다!

@Gothax Gothax merged commit d45a9d8 into CEOS-Developers:Immmii Oct 30, 2025
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.

4 participants