This commit is contained in:
wangkang
2017-07-29 10:18:34 +08:00
parent 697387cb27
commit 8b85ad6629
2 changed files with 10 additions and 11 deletions
@@ -74,24 +74,24 @@ public class ErrorMessage implements Serializable {
/**
* 描述 : http服务错误
*/
private HttpErrorMessage httpServerErrorMessage;
private HttpErrorMessage httpErrorMessage;
/**
* 描述 : 获取httpServerErrorMessage
* 描述 : 获取httpErrorMessage
*
* @return the httpServerErrorMessage
* @return the httpErrorMessage
*/
public HttpErrorMessage getHttpServerErrorMessage() {
return httpServerErrorMessage;
public HttpErrorMessage getHttpErrorMessage() {
return httpErrorMessage;
}
/**
* 描述 : 设置httpServerErrorMessage
* 描述 : 设置httpErrorMessage
*
* @param httpServerErrorMessage the httpServerErrorMessage to set
* @param httpErrorMessage the httpErrorMessage to set
*/
public void setHttpServerErrorMessage(HttpErrorMessage httpServerErrorMessage) {
this.httpServerErrorMessage = httpServerErrorMessage;
public void setHttpErrorMessage(HttpErrorMessage httpErrorMessage) {
this.httpErrorMessage = httpErrorMessage;
}
/**
@@ -142,8 +142,7 @@ public class ExceptionMapping {
ErrorMessage em = ExceptionMapping.buildErrorMessage(HttpStatus.INTERNAL_SERVER_ERROR.value(),
returnCode, returnMessage, applicationConfig.isOutputExceptionStackTrace(),
restClientResponseException);
em.setHttpServerErrorMessage(
new HttpErrorMessage(restClientResponseException, xssObjectMapper));
em.setHttpErrorMessage(new HttpErrorMessage(restClientResponseException, xssObjectMapper));
LOGGER.error(em.getId(), restClientResponseException);
return new RestResponse<>(returnCode, returnMessage, em);
}