Skip to content

refactor(sample): 조회 예외를 비검사 예외로 변환하다 - #50

Merged
jei007 merged 1 commit into
eGovFramework:mainfrom
itcen-entec-2026:refactor/sample-exception-handling
Sep 9, 2026
Merged

jei007 merged 1 commit into
eGovFramework:mainfrom
itcen-entec-2026:refactor/sample-exception-handling

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.

개요

샘플 게시글 조회 과정에서 발생하는 프레임워크 예외를 비검사 예외로 변환하고,
호출 계층에 남아 있던 불필요한 예외 선언을 정리합니다.

변경 사항

  • 조회 결과가 없을 때 processException()이 반환하는 예외를
    BaseRuntimeException으로 감싸서 발생시키도록 변경
  • EgovSampleService.selectSample()의 throws BaseRuntimeException, Exception 제거
  • EgovSampleController.updateSampleView()의 예외 선언 제거
  • 서비스, 컨트롤러 및 매퍼의 불필요한 예외 Javadoc 제거
  • 관련 서비스 테스트의 예외 선언과 미사용 import 제거

변경 파일

  • src/main/java/egovframework/example/sample/service/EgovSampleService.java
  • src/main/java/egovframework/example/sample/service/impl/EgovSampleServiceImpl.java
  • src/main/java/egovframework/example/sample/service/impl/SampleMapper.java
  • src/main/java/egovframework/example/sample/web/EgovSampleController.java
  • src/test/java/egovframework/example/sample/service/impl/EgovSampleServiceImplTestInsertSampleTest.java
  • src/test/java/egovframework/example/sample/service/impl/EgovSampleServiceImplTestSelectSampleListTest.java
  • src/test/java/egovframework/example/sample/service/impl/EgovSampleServiceImplTestUpdateSampleTest.java

영향 범위

  • 샘플 게시글 단건 조회 서비스
  • 게시글 수정 화면 진입 처리
  • 샘플 서비스 단위 테스트
  • 정상 조회 흐름과 사용자 화면 동작에는 변경 없음

검증

  • JDK 17.0.17 및 Maven 3.9.9 환경에서 mvn -Ptest clean test 빌드 성공
  • 운영 소스 10개와 테스트 소스 12개 컴파일 성공
  • git diff --check 통과
  • 현재 POM의 Surefire 설정에서 skipTests가 활성화되어 있어 테스트 실행은 생략됨

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.

조회 결과가 없을 때 발생하는 프레임워크 예외를
BaseRuntimeException으로 감싸 호출 계층에 노출하지 않도록 한다.

서비스 인터페이스와 구현체, 컨트롤러 및 관련 테스트에서
불필요한 예외 선언과 import, Javadoc을 제거한다.

@jei007 jei007 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@jei007
jei007 merged commit b4d01cf into eGovFramework:main Sep 9, 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