diff --git a/zlt-gateway/sc-gateway/src/main/java/com/central/gateway/error/JsonErrorWebExceptionHandler.java b/zlt-gateway/sc-gateway/src/main/java/com/central/gateway/error/JsonErrorWebExceptionHandler.java index 604561b6..6cd1101f 100644 --- a/zlt-gateway/sc-gateway/src/main/java/com/central/gateway/error/JsonErrorWebExceptionHandler.java +++ b/zlt-gateway/sc-gateway/src/main/java/com/central/gateway/error/JsonErrorWebExceptionHandler.java @@ -3,6 +3,7 @@ package com.central.gateway.error; import org.springframework.boot.autoconfigure.web.ErrorProperties; import org.springframework.boot.autoconfigure.web.ResourceProperties; import org.springframework.boot.autoconfigure.web.reactive.error.DefaultErrorWebExceptionHandler; +import org.springframework.boot.web.error.ErrorAttributeOptions; import org.springframework.boot.web.reactive.error.ErrorAttributes; import org.springframework.context.ApplicationContext; import org.springframework.http.HttpStatus; @@ -31,7 +32,7 @@ public class JsonErrorWebExceptionHandler extends DefaultErrorWebExceptionHandle * 获取异常属性 */ @Override - protected Map getErrorAttributes(ServerRequest request, boolean includeStackTrace) { + protected Map getErrorAttributes(ServerRequest request, ErrorAttributeOptions options) { Throwable error = super.getError(request); return responseError(request, error); }