This commit is contained in:
tanghc
2019-08-30 08:51:43 +08:00
parent c240a6337a
commit 1ab8e22885
2 changed files with 2 additions and 9 deletions

View File

@@ -25,13 +25,12 @@ public class ZuulResultExecutor extends BaseExecutorAdapter<RequestContext, Stri
@Override
public int getResponseStatus(RequestContext requestContext) {
List<Pair<String, String>> bizHeaders = requestContext.getZuulResponseHeaders();
int status = bizHeaders.stream()
return bizHeaders.stream()
.filter(header -> SopConstants.X_SERVICE_ERROR_CODE.equals(header.first()))
.map(header -> Integer.valueOf(header.second()))
.findFirst()
.orElse(requestContext.getResponseStatusCode());
return status;
}
@Override

View File

@@ -43,12 +43,6 @@ public class SpringMvcServiceConfiguration {
return new GlobalExceptionHandler();
}
@Bean
@ConditionalOnMissingBean
ErrorController errorController() {
return new ErrorController();
}
@Bean
@ConditionalOnMissingBean
ServiceRouteController serviceRouteInfoHandler() {