@ExceptionHandler(value = { HystrixRuntimeException.class })
public final ResponseEntity<?> handleException(HystrixRuntimeException e, WebRequest request) {
HttpStatus status = HttpStatus.SERVICE_UNAVAILABLE;
String message = e.getMessage();
FailureType type = e.getFailureType();
// 对命令抛出的异常进行特殊处理
if (type.equals(FailureType.COMMAND_EXCEPTION)) {
status = HttpStatus.INTERNAL_SERVER_ERROR;
message = Exceptions.getErrorMessageWithNestedException(e);
}
logger.error(message, e);