|
|
@@ -24,15 +24,14 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import com.fasterxml.jackson.databind.JsonMappingException;
|
|
|
+import com.gagaframework.web.rest.exception.GagaRestException;
|
|
|
+import com.gagaframework.web.rest.server.GagaResponse;
|
|
|
+import com.gagaframework.web.rest.server.GagaResponseStatus;
|
|
|
import com.style24.core.biz.thirdparty.KollusApi;
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
-import com.gagaframework.web.rest.exception.GagaRestException;
|
|
|
-import com.gagaframework.web.rest.server.GagaResponse;
|
|
|
-import com.gagaframework.web.rest.server.GagaResponseStatus;
|
|
|
-
|
|
|
/**
|
|
|
* Controller Advice
|
|
|
*
|
|
|
@@ -129,6 +128,22 @@ public class TscBaseController {
|
|
|
throwable = rootCause;
|
|
|
}
|
|
|
|
|
|
+ // Ajax 호출인지 여부를 체크. 2021.11.16. gagamel
|
|
|
+ // HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
|
|
+ // String reqWith = request.getHeader("x-requested-with");
|
|
|
+ //
|
|
|
+ // if (StringUtils.isBlank(reqWith) || !"XMLHttpRequest".equals(reqWith)) {
|
|
|
+ // HttpServletResponse response = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
|
|
|
+ //
|
|
|
+ // try {
|
|
|
+ // // 에러 페이지로 forwarding
|
|
|
+ // request.getRequestDispatcher("/error").forward(request, response);
|
|
|
+ // } catch (Exception e) {
|
|
|
+ // // Do nothing
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // Ajax 호출인지 여부를 체크. 2021.11.16. gagamel
|
|
|
+
|
|
|
if (throwable instanceof SQLException || throwable instanceof BindingException
|
|
|
|| throwable instanceof JsonMappingException
|
|
|
|| throwable instanceof UndeclaredThrowableException) {
|