1. 直接Date
@ApiOperation(value = " 测试前后端日期传输")
@GetMapping("/testDate")
public void testDate(@ApiParam @RequestParam("date") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date date){
Date date1=date;
System.out.println(date);
}
2 将Date包装起来
@ApiModelProperty(value = "日志起始时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date minOperationDate;
@ApiModelProperty(value = "日志结束时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date maxOperationDate;