org.springframework.web.method.annotation.MethodArgumentTypeMismatchException:
Failed to convert value of type ‘java.lang.String’ to required type ‘java.time.LocalDateTime’;
nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [@org.springframework.web.bind.annotation.RequestParam @org.springframework.format.annotation.DateTimeFormat java.time.LocalDateTime] for value ‘2019/10/24 14:42:04’; nested exception is java.lang.IllegalArgumentException: Parse attempt failed for value [2019/10/24 14:42:04]
这次粗心大意,刚刚实习就展现了许多低级错误,
首先参数类型错误 没有看清到底是LocalDateTime还是LocalTime
之前的代码是错的 本次业务分页查询 + 条件查询,注意空指针异常尤其是刚开始打开页面没有传入任何参数的时候容易报空指针,时间参数做好判断