搭配log.info("") 输出日志的作用。
例如
@RestController @Slf4j public class PaymentController { public CommonResult<Payment> create(@RequestBody Payment payment) { int result = paymentService.create(payment); log.info("*****插入结果:" + result); if (result > 0) { //成功 return new CommonResult(200, "插入数据库成功", result); } else { return new CommonResult(444, "插入数据库失败", null); } }