Merge branch 'master' into eureka

eureka
tanghc 5 years ago
commit d0e7cd2243
  1. 8
      sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/configuration/GlobalExceptionHandler.java

@ -8,7 +8,6 @@ import com.gitee.sop.servercommon.result.ServiceResultBuilder;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@ -38,13 +37,6 @@ public class GlobalExceptionHandler {
*/ */
private static final String X_SERVICE_ERROR_HEADER_NAME = "x-service-error-code"; private static final String X_SERVICE_ERROR_HEADER_NAME = "x-service-error-code";
@RequestMapping("/error")
@ResponseBody
public Object error(HttpServletRequest request, HttpServletResponse response) {
ServiceResultBuilder serviceResultBuilder = ServiceConfig.getInstance().getServiceResultBuilder();
return serviceResultBuilder.buildError(request, response, new ServiceException("系统繁忙"));
}
/** /**
* 捕获手动抛出的异常 * 捕获手动抛出的异常
* *

Loading…
Cancel
Save