Skip to content

refactor: 생성자 주입으로 변경#58

Open
LeeBaekHaeng wants to merge 1 commit into
eGovFramework:mainfrom
itcen-entec-2026:refactor/cleanup/SampleMapper2
Open

refactor: 생성자 주입으로 변경#58
LeeBaekHaeng wants to merge 1 commit into
eGovFramework:mainfrom
itcen-entec-2026:refactor/cleanup/SampleMapper2

Conversation

@LeeBaekHaeng

Copy link
Copy Markdown
Contributor

수정 사유 Reason for modification

소스를 수정한 사유가 무엇인지 체크해 주세요. Please check the reason you modified the source. ([X] X는 대문자여야 합니다.)

  • 버그수정 Bug fixes
  • 기능개선 Enhancements
  • 기능추가 Adding features
  • 기타 Others

수정된 소스 내용 Modified source

검토자를 위해 수정된 소스 내용을 설명해 주세요. Please describe the modified source for reviewers.

변경 내용

  • EgovIdGnrService 의존성 주입 방식을 필드 주입(@Resource)에서 생성자 주입으로 변경
  • @RequiredArgsConstructor를 활용하여 불변 의존성(final)으로 관리
  • 문자열 기반 Bean 참조 제거
  • Spring 권장 DI 방식 적용으로 테스트 용이성 및 유지보수성 향상

변경 전

@Resource(name = "egovIdGnrService")
private EgovIdGnrService egovIdGnrService;

변경 후

private final EgovIdGnrService egovIdGnrService;

기대 효과

  • 컴파일 시점 의존성 검증 가능
  • 불변 객체를 통한 안정성 향상
  • 테스트 코드 작성 및 Mock 주입 용이
  • Spring 및 전자정부 표준프레임워크 최신 개발 가이드 준수

JUnit 테스트 JUnit tests

테스트를 완료하셨으면 다음 항목에 [대문자X]로 표시해 주세요. When you're done testing, check the following items.

  • JUnit 테스트 JUnit tests
  • 수동 테스트 Manual testing

테스트 브라우저 Test Browser

테스트를 진행한 브라우저를 선택해 주세요. Please select the browser(s) you ran the test on. (다중 선택 가능 you can select multiple) [X] X는 대문자여야 합니다.

  • Chrome
  • Firefox
  • Edge
  • Safari
  • Opera
  • Internet Explorer
  • 기타 Others

http://localhost:8080/

테스트 스크린샷 또는 캡처 영상 Test screenshots or captured video

테스트 전과 후의 스크린샷 또는 캡처 영상을 이곳에 첨부해 주세요. Please attach screenshots or video captures of your before and after tests here.

https://youtu.be/A8u5YMC3eug

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.

1 participant