Skip to content

refactor: 불필요한 import 및 ModelAttribute name 속성 제거#59

Merged
eGovFrameSupport merged 3 commits into
eGovFramework:mainfrom
itcen-entec-2026:refactor/remove-unused-imports-and-pathvariable-names
Jul 2, 2026
Merged

refactor: 불필요한 import 및 ModelAttribute name 속성 제거#59
eGovFrameSupport merged 3 commits into
eGovFramework:mainfrom
itcen-entec-2026:refactor/remove-unused-imports-and-pathvariable-names

Conversation

@LeeBaekHaeng

@LeeBaekHaeng LeeBaekHaeng commented Jun 30, 2026

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.

변경 사항

  • 사용하지 않는 import 제거

    • ArgumentMatchers.any
    • ReflectionTestUtils
  • Spring Controller의 불필요한 @ModelAttribute name/value 속성 제거

    • IDE(Spring Boot) Inspection WEB_ANNOTATION_NAMES 경고 해소
    • 메서드 파라미터명과 동일한 경우 @ModelAttribute을 간소화

기대 효과

  • IDE Warning 제거
  • 코드 가독성 향상
  • Spring 권장 스타일 적용
  • 불필요한 코드 정리(Refactoring)

영향 범위

  • 기능 변경 없음
  • 리팩터링 및 코드 정리만 수행

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

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

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

https://youtu.be/NAHrbJQK-BM

@eGovFrameSupport

Copy link
Copy Markdown
Contributor

표준프레임워크에 대한 지속적인 참여에
대단히 감사드립니다.

다만 반영 전 추가 정리가 필요합니다.

  1. 컨트롤러 의존성 주입이 일부만 정리됨

이 PR은 EgovSampleController를 수정하면서 어노테이션(@ModelAttribute)만 정리하고, 정작 컨트롤러 자신의 의존성 주입은
기존 @resource 필드 주입 그대로 두었습니다.

@Resource(name = "sampleService")
private EgovSampleService sampleService;

@Resource(name = "propertiesService")
private EgovPropertyService propertiesService;
  • 원인/영향: 최근 EgovSampleServiceImpl이 생성자 주입으로 전환하였는데 (refactor: 생성자 주입으로 변경 #58)
    그런데 같은 PR에서 손대는 컨트롤러는 그 방향을 따르지 않아, 서비스 계층과 웹 계층의 주입 방식이 엇갈린 채로 남습니다.
    방향은 맞지만 일부만 적용되면 오히려 코드 전반의 일관성이 흐트러집니다.
  1. 제목·커밋 메시지가 실제 변경과 불일치

PR 제목과 커밋 메시지는 "PathVariable name 속성 제거"라고 되어 있으나, 실제 변경에는 @PathVariable이 없고
@ModelAttribute의 명시명 제거가 이루어집니다. 이력만으로 변경 내용을 파악할 수 없으니, 제목과 커밋 메시지를 실제
변경(@ModelAttribute 명시명 제거 및 미사용 import 정리)에 맞게 정정해 주시기 바랍니다.

1. 컨트롤러 의존성 주입이 일부만 정리됨
생성자 주입으로 전환
@LeeBaekHaeng LeeBaekHaeng changed the title refactor: 불필요한 import 및 PathVariable name 속성 제거 refactor: 불필요한 import 및 ModelAttribute name 속성 제거 Jul 1, 2026
@LeeBaekHaeng

LeeBaekHaeng commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

요청하신대로 반영 전 추가 정리했습니다.

  1. 컨트롤러 의존성 주입이 일부만 정리됨
  • 생성자 주입으로 전환
  1. 제목·커밋 메시지가 실제 변경과 불일치
  • 제목과 커밋 메시지를 실제 변경(@ModelAttribute 명시명 제거 및 미사용 import 정리)에 맞게 정정

https://youtu.be/7mRi3r-sN58

@eGovFrameSupport

Copy link
Copy Markdown
Contributor

표준프레임워크에 대한 지속적인 참여에
대단히 감사드립니다.

@eGovFrameSupport eGovFrameSupport merged commit 7b38451 into eGovFramework:main Jul 2, 2026
1 check passed
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