🔊 优化网关日志输出,只输出日志信息 不输出错误堆栈
This commit is contained in:
1 parent
23b0bb7453
commit
3790f7d583
1 file changed
+1
-1
+1
-1
@@ -46,7 +46,7 @@ public class GlobalExceptionConfiguration implements ErrorWebExceptionHandler {
|
||||
return response.writeWith(Mono.fromSupplier(() -> {
|
||||
DataBufferFactory bufferFactory = response.bufferFactory();
|
||||
try {
|
||||
log.error("Error Spring Cloud Gateway :", ex);
|
||||
log.error("Error Spring Cloud Gateway : {}", ex.getMessage());
|
||||
return bufferFactory.wrap(objectMapper.writeValueAsBytes(R.failed(ex.getMessage())));
|
||||
}
|
||||
catch (JsonProcessingException e) {
|
||||
|
||||
Reference in new issue
Block a user