Failed to convert value of type ‘java.lang.String’ to required type ‘java.util.Date’
springboot在controller层的GET接口中接受java.util.Date类型参数,发生Failed to convert value of type 'java.lang.String' to required type 'java.util.Date'
错误
需要在controller接口中格式化接收的Date,如图修改为
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")Date date