|
|
@ -1,9 +1,6 @@ |
|
|
|
package io.sc.platform.core.bean; |
|
|
|
|
|
|
|
import io.sc.platform.core.response.ErrorResponseWrapper; |
|
|
|
import io.sc.platform.core.response.ResponseWrapper; |
|
|
|
import io.sc.platform.core.response.ResponseWrapperBuilder; |
|
|
|
import io.sc.platform.core.response.ValidateException; |
|
|
|
import io.sc.platform.core.response.*; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.http.HttpStatus; |
|
|
@ -13,6 +10,7 @@ import org.springframework.web.bind.annotation.ResponseBody; |
|
|
|
import org.springframework.web.bind.annotation.ResponseStatus; |
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
@ -26,6 +24,7 @@ public class GlobalExceptionHandler { |
|
|
|
@ExceptionHandler(value =Exception.class) |
|
|
|
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) |
|
|
|
@ResponseBody |
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
public ResponseWrapper exceptionHandler(Exception e){ |
|
|
|
log.error("",e); |
|
|
|
if(e instanceof ValidateException){ |
|
|
|