public class ExceptionTransfer extends Object
NOTE: Exception 종류를 EgovBizException, RuntimeException(DataAccessException 포함), FdlException , 나머지 Exception 으로 나누고 있으며, 후처리로직은 EgovBizException, RuntimeException 에서만 동작한다. 그리고 나머지 Exception 의 경우 Exception 을 BaseException (메세지: fail.common.msg)으로 재생성하여 변경 던진다. 따라서 fail.common.msg 메세지키가 Message Resource 에 정의 되어 있어야 한다.
<< 개정이력(Modification Information) >> 수정일 수정자 수정내용 ------- -------- --------------------------- 2009.05.30 Judd Cho 최초 생성 2015.01.31 Vincent Han 코드 품질 개선 및 보완 (processHandling 메소드 Exception 처리)
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
ExceptionTransfer.ExceptionCreator
Exception 생성 인터페이스이다.
|
| Constructor and Description |
|---|
ExceptionTransfer() |
| Modifier and Type | Method and Description |
|---|---|
int |
countOfTheExceptionHandlerService()
ExceptionHandlerService을 여러개 지정한다.
|
protected org.slf4j.Logger |
getLog(Class<?> clazz)
Logger 얻기.
|
protected Exception |
processException(Class<?> clazz,
String msgKey,
String[] msgArgs,
Exception e,
Locale locale)
발생한 Exception 에 따라 후처리 로직이 실행할 수 있도록 연결하는 역할을 수행한다.
|
protected Exception |
processException(Class<?> clazz,
String msgKey,
String[] msgArgs,
Exception e,
Locale locale,
ExceptionTransfer.ExceptionCreator ec)
발생한 Exception 에 따라 후처리 로직이 실행할 수 있도록 연결하는 역할을 수행한다.
|
protected void |
processHandling(Class<?> clazz,
String methodName,
Exception exception,
org.springframework.util.PathMatcher pm,
ExceptionHandlerService[] exceptionHandlerServices)
발생한 Exception 에 따라 후처리 로직이 실행할 수 있도록 연결하는 역할을 수행한다.
|
void |
setExceptionHandlerService(ExceptionHandlerService[] exceptionHandlerServices)
ExceptionHandlerService을 여러개 지정한다.
|
void |
transfer(org.aspectj.lang.JoinPoint thisJoinPoint,
Exception exception)
발생한 Exception 에 따라 후처리 로직이 실행할 수 있도록 연결하는 역할을 수행한다.
|
public void setExceptionHandlerService(ExceptionHandlerService[] exceptionHandlerServices)
exceptionHandlerServices - array of HandlerServicepublic int countOfTheExceptionHandlerService()
public void transfer(org.aspectj.lang.JoinPoint thisJoinPoint,
Exception exception)
throws Exception
thisJoinPoint - joinPoint 객체exception - 발생한 ExceptionExceptionprotected org.slf4j.Logger getLog(Class<?> clazz)
clazz - the returned logger will be named after clazzprotected Exception processException(Class<?> clazz, String msgKey, String[] msgArgs, Exception e, Locale locale)
clazz - Exception 발생 클래스msgKey - Message keymsgArgs - Message argumentse - Exceptionlocale - Localeprotected Exception processException(Class<?> clazz, String msgKey, String[] msgArgs, Exception e, Locale locale, ExceptionTransfer.ExceptionCreator ec)
clazz - Exception 발생 클래스msgKey - Message keymsgArgs - Message argumentse - Exceptionlocale - Localeec - ExceptionCreatorprotected void processHandling(Class<?> clazz, String methodName, Exception exception, org.springframework.util.PathMatcher pm, ExceptionHandlerService[] exceptionHandlerServices)
clazz - Exception 발생 클래스methodName - Exception 발생 메소드명exception - 발생한 Exceptionpm - 발생한 PathMatcher(default : AntPathMatcher)exceptionHandlerServices[] - 등록되어 있는 ExceptionHandlerService 리스트Copyright © 2015. All rights reserved.