-
Notifications
You must be signed in to change notification settings - Fork 97
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
[2단계 - 최단 경로 및 요금 조회 api] 주드 미션 제출합니다. #102
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.
안녕하세요 주드! 빙봉입니다 🙂
2단계 잘 작성해주셨네요! 질문에 대한 답변 및 코멘트 남겼으니 확인해주세요~
궁금한 점은 언제든 편하게 DM 주세요!
src/main/java/subway/application/feepolicy/DefaultFeePolicy.java
Outdated
Show resolved
Hide resolved
src/main/java/subway/application/feepolicy/DefaultFeePolicy.java
Outdated
Show resolved
Hide resolved
안녕하세요 빙봉! 테스트 편의성을 위해 sql join을 통해 join 구문만을 위한 엔티티를 작성하고 객체로 변경하는 방법을 거치는 것보다 select쿼리를 필요한 만큼 보내고 도메인 객체로 변환하는 것이 트레이드오프에서 이득이라고 생각했습니다. 단순 조인문이라면 쿼리를 복잡하게 작성하는 것보다 쿼리를 여러번 날리는 선택을 하는 것이 유지보수에 좋다고 생각하기도 했습니다. 쿼리를 적게 날리는 성능상 이점과 기존의 자바코드를 재활용할 수 있다는 편리성 중 어느쪽을 선택하는 것이 좋을까요? |
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.
안녕하세요 주드! 빙봉입니다 🙂
질문주신 것에 대한 답변 및 코멘트 추가했습니다. 확인 부탁드려요!
궁금한 점은 언제나 편하게 DM 주세요!
- AddPathStrategy | ||
- 노선에 경로 추가시 분기와 중복 코드를 제거하기 위해 도입 | ||
|
||
## 기능 요구 사항 |
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.
이번 미션의 목표가 복잡한 도메인 이해와 설계인 만큼 요구사항이 좀 더 구체적이면 좋을 것 같아요! (e.g. 상행, 하행, 비용 정책 등..)
src/test/java/subway/application/service/feecalculator/DefaultFeeCalculatorTest.java
Outdated
Show resolved
Hide resolved
안녕하세요 빙봉! 리뷰 반영하고 다시 요청드립니다. |
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.
안녕하세요 주드! 빙봉입니다 🙂
전반적으로 잘 구현해주셨네요! 👍
질문에 대한 답변 및 추가 코멘트 남겼습니다! 다만 테스트에서 깨지는 부분이 있어 확인 한 번 부탁드려요!
궁금한 점은 언제든 편하게 DM 주세요~
} | ||
|
||
@Test | ||
void 기존에_있는_이름으로_노선을_추가한다() throws JsonProcessingException { |
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.
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.
왜 깨질까요..?
import subway.exception.StationNotFoundException; | ||
|
||
@RestControllerAdvice | ||
public class GlobalExceptionHandler extends ResponseEntityExceptionHandler { |
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.
에러가 발생하면 서버에서는 어떤 로그도 남기지 않는데요. ERROR 로그를 남기면 에러 분석에 도움이 되지 않을까요?
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.
slf4j를 통해 로그 남기도록 했습니다👍
this.feeCalculator = feeCalculator; | ||
} | ||
|
||
@Transactional(readOnly = true) |
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.
- FeeService 위에
@Transactional
이 붙어있는데 여기 다시@Transactional(readOnly = true)
이 붙어있네요. 하나만 적어도 될 것 같습니다! - 현재 상황에서
@Transactional(readOnly = true)
관련해서 다른 크루와 이야기를 나눈 게 있었는데요. 주드도 알면 좋을 것 같아서 공유드립니다! (주드에게도 똑같은 피드백으로 접근하면 좋으나 시간이 부족할 것 같아 링크로 전달드리는 점 양해부탁드려요 🙇 (링크))
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.
transaction은 상당한 공부가 필요해보이는군요,, 감사합니다
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.
패키지가 ui 쪽이 맞을까요?
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.
exception 패키지에 들어가도록 수정했습니다
안녕하세요 빙봉 |
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.
안녕하세요 주드! 빙봉입니다 🙂
피드백이 많았는데 끝까지 반영해주셔서 감사합니다! 많은 이야기를 나눌 수 있어서 재밌었어요! ㅎㅎ
request dto 혹은 response dto 질문에 답변하자면.. 팀 컨벤션에 맞춘다기보단 기본 생성자를 만들 이유가 없다면 만들지 않는 편이라고 이야기할 수 있을 것 같아요. jackson이 버전업을 하면서 만들지 않아도 되는 것처럼요. 필요없다면 굳이 작성하지 않습니다!
고생 많으셨고 지하철 미션은 여기서 머지할게요! 협업 미션 파이팅입니다!!
안녕하세요 빙봉!
처음 뵙겠습니다.
이전에 제출했던 1단계에서 코드를 다듬고 기타 예외처리 추가했습니다.
테스트 결과 (아마도) 모든 기능이 잘 작동할 것 같습니다.
가장 큰 질문은 패키지 구조에 대한 질문입니다.
현재 대부분의 패키지가 root에서 시작되어 상당히 번잡한 모양인데 더 효율적으로 나눌 방법이 있을까요?
현재 역을 추가하고 추가된 역을 노선에 추가하는 형태인데 현실과 결합해서 생각했을 때 둘의 생명주기는 같아야한다고 생각하지만 편의상 나누었습니다.
빙봉은 어떻게 생각하시나요?
첫리뷰 잘부탁드립니다..🙇♂️
추가) 프로덕션db와 테스트db를 나누라는 요구사항이 있어서 프로덕션은 mysql 사용했습니다! properties 봐주시면 감사하겠습니다,,