Code: Select all
@AfterReturning(value="pointCut()",returning = "respValue")
public void logResponse(JoinPoint joinPoint, Object respValue) throws Exception {
.......
log.info("response :: {}",respValue);
}
Code: Select all
@PostMapping("/test")
public Flux addCars(ServerWebExchange serverWebExchange) {
return service.addCars()
.onErrorResume(ex -> {
log.info("error ", ex);
return Mono.error();
});
}