Skip to content

feat(fdl-cmmn): RuntimeException 생성 메서드 추가#279

Open
LeeBaekHaeng wants to merge 1 commit into
eGovFramework:mainfrom
itcen-entec-2026:feat/fdl-cmmn-runtime-exception2
Open

feat(fdl-cmmn): RuntimeException 생성 메서드 추가#279
LeeBaekHaeng wants to merge 1 commit into
eGovFramework:mainfrom
itcen-entec-2026:feat/fdl-cmmn-runtime-exception2

Conversation

@LeeBaekHaeng

@LeeBaekHaeng LeeBaekHaeng commented Jul 19, 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.

EgovAbstractServiceImpl에 메시지 키를 이용하여 RuntimeException 타입의
EgovBizException을 생성하는 processRuntimeException(String) 메서드를 추가했습니다.

기존 processException(String, String[]) 처리 흐름을 재사용하여 메시지 리소스와
현재 로케일을 동일하게 적용합니다.

이를 통해 호출부에서 검사 예외 선언 없이 비즈니스 예외를 발생시켜야 하는 경우
RuntimeException 반환 타입을 직접 사용할 수 있습니다.


selectSample() 메서드에서 Checked Exception을 상위 계층으로 전파하지 않도록 개선하는 것을 제안합니다.

조회 결과가 없는 경우 processException() 대신 processRuntimeException()을 사용하여 Runtime Exception을 발생시키고, 이에 따라 메서드 선언부의 throws Exception과 Javadoc의 @exception Exception을 함께 제거합니다.

이를 통해 서비스 계층의 불필요한 Checked Exception 전파를 줄이고, 예외 처리를 일관되게 유지할 수 있습니다.

	/**
	 * 글을 조회한다.
	 * @param vo - 조회할 정보가 담긴 SampleVO
	 * @return 조회한 글
	 * @exception Exception
	 */
	@Override
//	public SampleVO selectSample(SampleVO vo) throws Exception {
	public SampleVO selectSample(SampleVO vo) {
		SampleVO resultVO = sampleMapper.selectSample(vo);
		if (resultVO == null) {
			//throw processException("info.nodata.msg");
            throw processRuntimeException("info.nodata.msg");
                }
		return resultVO;
	}

https://github.com/eGovFramework/egovframe-web-sample/blob/main/src/main/java/egovframework/example/sample/service/impl/EgovSampleServiceImpl.java

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.

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