|
|
@ -1,17 +1,16 @@
|
|
|
|
package kr.xit.core.exception;
|
|
|
|
package kr.xit.core.exception;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import egovframework.com.cmm.EgovMessageSource;
|
|
|
|
import java.util.Locale;
|
|
|
|
import java.util.Locale;
|
|
|
|
|
|
|
|
|
|
|
|
import org.egovframe.rte.fdl.cmmn.exception.BaseRuntimeException;
|
|
|
|
|
|
|
|
import org.springframework.context.MessageSource;
|
|
|
|
|
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseStatus;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import kr.xit.core.consts.ErrorCode;
|
|
|
|
import kr.xit.core.consts.ErrorCode;
|
|
|
|
import kr.xit.core.spring.annotation.SecurityPolicy;
|
|
|
|
import kr.xit.core.spring.util.CoreSpringUtils;
|
|
|
|
import lombok.Getter;
|
|
|
|
import lombok.Getter;
|
|
|
|
import lombok.Setter;
|
|
|
|
import lombok.Setter;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
|
import org.egovframe.rte.fdl.cmmn.exception.BaseRuntimeException;
|
|
|
|
|
|
|
|
import org.springframework.context.MessageSource;
|
|
|
|
|
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseStatus;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* <pre>
|
|
|
|
* <pre>
|
|
|
@ -36,6 +35,8 @@ public class BizRuntimeException extends BaseRuntimeException {
|
|
|
|
private String code;
|
|
|
|
private String code;
|
|
|
|
private ErrorCode errorCode;
|
|
|
|
private ErrorCode errorCode;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final EgovMessageSource messageSource = CoreSpringUtils.getMessageSource();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* BizRuntimeException 생성자.
|
|
|
|
* BizRuntimeException 생성자.
|
|
|
|
* @param errorCode ErrorCode 지정
|
|
|
|
* @param errorCode ErrorCode 지정
|
|
|
@ -74,6 +75,13 @@ public class BizRuntimeException extends BaseRuntimeException {
|
|
|
|
return e;
|
|
|
|
return e;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static BizRuntimeException create(String code, Object[] messageParameters) {
|
|
|
|
|
|
|
|
BizRuntimeException e = new BizRuntimeException();
|
|
|
|
|
|
|
|
e.setCode(code);
|
|
|
|
|
|
|
|
e.setMessage(messageSource.getMessage(code, messageParameters));
|
|
|
|
|
|
|
|
return e;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* BizRuntimeException 생성자.
|
|
|
|
* BizRuntimeException 생성자.
|
|
|
|
* @param wrappedException 원인 Exception
|
|
|
|
* @param wrappedException 원인 Exception
|
|
|
@ -189,4 +197,8 @@ public class BizRuntimeException extends BaseRuntimeException {
|
|
|
|
public HttpStatus getHttpStatus(){
|
|
|
|
public HttpStatus getHttpStatus(){
|
|
|
|
return HttpStatus.BAD_REQUEST;
|
|
|
|
return HttpStatus.BAD_REQUEST;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|