Skip to content

[운송I (배송)] 미션 구현 (김난슬)#6

Open
seulnan wants to merge 5 commits intoallrounder-backend:mainfrom
seulnan:rollback/a
Open

[운송I (배송)] 미션 구현 (김난슬)#6
seulnan wants to merge 5 commits intoallrounder-backend:mainfrom
seulnan:rollback/a

Conversation

@seulnan
Copy link

@seulnan seulnan commented Aug 11, 2025

💡 Summary

2시간 반 밖에 투자하지못했습니다;.......죄송합니다 코드를 쌌습니다............

✅ CheckList

  • 기본 기능 구현
  • 단위&통합테스트 실행 및 통과
  • 응용 기능 구현

신경써서 구현한 점 / 어려웠던 점

  • 커서 + 지피티 5 썼는데 아직 유지보수를 고려한 코드를 잘 짜진 못하더라.
    -> 자바스터디가 아니라 커서스터디를 했다.
  • 어노테이션으로 로깅 (DEBUG, WARN, ERROR) 레벨을 나눠서 적용해봄.
  • 미안 호건아 너말안듣고 mockito라이브러리 썼어. 유어슈 연습해보고싶어서 적용해봄.

📚 Retrospective (YWT)

What I did

  • 클린아키텍처도 아닌것이...헥사고날도 아닌것이...험한 아키텍처가 나와버렸다
  • 구현이랑 비즈니스로직을 분리하려고 노력하다보니 유스케이스자체를 클래스로 정의해버렸는데 꽤 신박할지도..?

What I Learned

  • 클린아키텍처 적용
  • 커서 이용법.. AI가 잘 짜는 부분(전체적인 구조,예외상황추가, 그에 대한 테스트코드), 못짜는 부분(세부적인 코드레벨에서의 디테일 -> Import문을 봤을때 얘가 이걸 왜 의존하지? 의존성박살났다하는 경우들이 많았음, var 사용-> ruleset에서 하지말라고 하면될듯 )

그외에도 validate를 그냥 도메인로직안에 둔다든가, 아니면 error enum을 안짜준다든가
근데 이건 지금 생각해보니까 이게 더 가독성에 도움이 될지도

What I will do next

  • CSV IO 관련 레전드 구현덩어리들로 꽁꽁 싸맸는데 이거 리팩토링 필요
  • 테스트도 중복케이스 많아서 정리 필요 호건이한테는 미안하지만 mockito를 써서 중복로직을 좀 줄여볼 생각입니다.

✨ Impression

죄송합니다..................................이후 확장하면서 제 똥같은 코드를 고치고 그에 대한 자세한 문제해결과정 남겨놓겠습니다....

@Log(LogLevel.DEBUG)
public static void main(String[] args) {
//TODO: 미션 구현
CompositionRoot compositionRoot = new CompositionRoot();
Copy link

@ddoddogga ddoddogga Aug 16, 2025

Choose a reason for hiding this comment

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

오 구성루트를 메인에 구현하지 않고 따로 만든 게 깔끔하고 좋은 거 같아요

validateDifferentPlaces(fromName, toName);

PlaceWithPositionDto fromPlaceWithPosition = placeService.getPlaceWithPosition(fromName);
PlaceWithPositionDto toPlaceWithPosition = placeService.getPlaceWithPosition(toName);

Choose a reason for hiding this comment

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

장소와 위치 정보를 Dto로 가져온 점이 인상적이에요


import mission.common.log.LogLevel;

public final class AppConfig {

Choose a reason for hiding this comment

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

final을 붙여서 다른 클래스가 상속할 수 없게 하는 거군요.

private AppConfig() {}

public static double speedKmPerHour() {
String prop = System.getProperty("speed.kmph");

Choose a reason for hiding this comment

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

JVM 시스템 프로퍼티(System Property)를 통해 속도를 가져오는 것이네요. 속도를 변경할 수 있게 만든 점이 좋네요.
아래 if문 두 개는 합쳐도 될 것 같네요.

return LogLevel.valueOf(prop.trim().toUpperCase());
} catch (IllegalArgumentException e) {
mission.common.log.Logger.log(AppConfig.class, mission.common.log.LogLevel.WARN,
"Invalid log level configuration: " + prop + ", using default: " + DEFAULT_LOG_LEVEL);

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