fix: source cleansing
parent
921e0bd1bf
commit
99653d60ef
@ -1,53 +0,0 @@
|
||||
package kr.xit.core.spring.config.support;
|
||||
|
||||
import kr.xit.core.exception.BizRuntimeException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.client.ClientHttpResponse;
|
||||
import org.springframework.web.client.DefaultResponseErrorHandler;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* description : RestTemplate Error Handler
|
||||
* packageName : kr.xit.core.spring.config.support
|
||||
* fileName : RestResponseErrorHandler
|
||||
* author : julim
|
||||
* date : 2023-04-28
|
||||
* ======================================================================
|
||||
* 변경일 변경자 변경 내용
|
||||
* ----------------------------------------------------------------------
|
||||
* 2023-04-28 julim 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
* @see kr.xit.core.spring.config.RestTemplateConfig#restTemplate
|
||||
*/
|
||||
@Slf4j
|
||||
public class RestResponseErrorHandler extends DefaultResponseErrorHandler {
|
||||
|
||||
@Override
|
||||
public void handleError(ClientHttpResponse response) throws IOException {
|
||||
String seriesName = "UNKNOWN_ERROR";
|
||||
|
||||
if (response.getStatusCode() == HttpStatus.PRECONDITION_FAILED) {
|
||||
seriesName = String.valueOf(HttpStatus.PRECONDITION_FAILED.value());
|
||||
|
||||
}else if (response.getStatusCode().series() == HttpStatus.Series.SERVER_ERROR) {
|
||||
// handle SERVER_ERROR
|
||||
seriesName = HttpStatus.Series.SERVER_ERROR.name();
|
||||
|
||||
} else if (response.getStatusCode().series() == HttpStatus.Series.CLIENT_ERROR) {
|
||||
// handle CLIENT_ERROR
|
||||
seriesName = HttpStatus.Series.CLIENT_ERROR.name();
|
||||
if (response.getStatusCode() == HttpStatus.NOT_FOUND) {
|
||||
seriesName = String.valueOf(HttpStatus.NOT_FOUND.value());
|
||||
}
|
||||
}
|
||||
log.error("========================== RestResponse Error ==============================");
|
||||
log.error("SERIES NAME : {}", seriesName);
|
||||
log.error("STATUS CODE : {}", response.getStatusCode());
|
||||
log.error("=============================================================================");
|
||||
//throw BizRuntimeException.create(String.valueOf(response.getStatusCode().value()), null);
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
/**
|
||||
* egov framework config package classes
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
* @since 1.0
|
||||
* @author limju
|
||||
* @version 1.0
|
||||
*/
|
||||
package egovframework.com.cmm.config;
|
@ -1,10 +0,0 @@
|
||||
/**
|
||||
* egov framework interceptor package classes
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
* @since 1.0
|
||||
* @author limju
|
||||
* @version 1.0
|
||||
*/
|
||||
package egovframework.com.cmm.interceptor;
|
@ -1,10 +0,0 @@
|
||||
/**
|
||||
* egov framework java web token package classes
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
* @since 1.0
|
||||
* @author limju
|
||||
* @version 1.0
|
||||
*/
|
||||
package egovframework.com.cmm.jwt.config;
|
@ -1,10 +0,0 @@
|
||||
/**
|
||||
* egov framework model package classes
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
* @since 1.0
|
||||
* @author limju
|
||||
* @version 1.0
|
||||
*/
|
||||
package egovframework.com.cmm.model;
|
@ -1,10 +0,0 @@
|
||||
/**
|
||||
* egov framework package classes
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
* @since 1.0
|
||||
* @author limju
|
||||
* @version 1.0
|
||||
*/
|
||||
package egovframework.com.cmm;
|
@ -1,10 +0,0 @@
|
||||
/**
|
||||
* egov framework util package classes
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
* @since 1.0
|
||||
* @author limju
|
||||
* @version 1.0
|
||||
*/
|
||||
package egovframework.com.cmm.util;
|
@ -1,10 +0,0 @@
|
||||
/**
|
||||
* egov framework web package classes
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
* @since 1.0
|
||||
* @author limju
|
||||
* @version 1.0
|
||||
*/
|
||||
package egovframework.com.cmm.web;
|
Loading…
Reference in New Issue