🔊 spring cloud gateway 异常输出日志堆栈 方便排查
This commit is contained in:
1 parent
30cd285b81
commit
d9882ae1e2
1 file changed
+1
+1
@@ -46,6 +46,7 @@ public class GlobalExceptionConfiguration implements ErrorWebExceptionHandler {
|
||||
return response.writeWith(Mono.fromSupplier(() -> {
|
||||
DataBufferFactory bufferFactory = response.bufferFactory();
|
||||
try {
|
||||
log.error("Error Spring Cloud Gateway :", ex);
|
||||
return bufferFactory.wrap(objectMapper.writeValueAsBytes(R.failed(ex.getMessage())));
|
||||
}
|
||||
catch (JsonProcessingException e) {
|
||||
|
||||
Reference in new issue
Block a user