👽 由于外部API的改变而更新代码

This commit is contained in:
冷冷 committed 2018-12-15 22:49:36 +08:00
1 parent 0d443a2f1a
commit 5a24512655
5 files changed
+62 -15

No files matched your search

@@ -83,7 +83,7 @@ public class ValidateCodeGatewayFilter extends AbstractGatewayFilterFactory {
return response.writeWith(Mono.just(response.bufferFactory()
.wrap(objectMapper.writeValueAsBytes(
R.builder().msg(e.getMessage())
.code(CommonConstant.FAIL).build()))));
.code(CommonConstants.FAIL).build()))));
} catch (JsonProcessingException e1) {
log.error("对象输出异常", e1);
}
@@ -17,7 +17,7 @@
package com.pig4cloud.pigx.gateway.handler;
import com.pig4cloud.pigx.common.core.constant.CommonConstant;
import com.pig4cloud.pigx.common.core.constant.CommonConstants;
import com.pig4cloud.pigx.common.core.util.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
@@ -51,7 +51,7 @@ public class HystrixFallbackHandler implements HandlerFunction<ServerResponse> {
.contentType(MediaType.APPLICATION_JSON_UTF8)
.body(BodyInserters.fromObject(R.builder()
.msg("服务异常")
.code(CommonConstant.FAIL)
.code(CommonConstants.FAIL)
.build()));
}
}