1.x
tanghc 5 years ago
parent 66b19d0163
commit f3735099cb
  1. 2
      sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/zuul/configuration/ZuulErrorController.java

@ -2,6 +2,7 @@ package com.gitee.sop.gatewaycommon.zuul.configuration;
import com.gitee.sop.gatewaycommon.bean.ApiContext;
import com.gitee.sop.gatewaycommon.result.ResultExecutor;
import com.gitee.sop.gatewaycommon.zuul.ZuulContext;
import com.netflix.zuul.context.RequestContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.web.servlet.error.ErrorController;
@ -35,6 +36,7 @@ public class ZuulErrorController implements ErrorController {
}
ctx.setResponseStatusCode(HttpStatus.OK.value());
Throwable throwable = ctx.getThrowable();
log.error("请求错误,params:{}", ZuulContext.getApiParam(), throwable);
return this.buildResult(throwable);
}

Loading…
Cancel
Save