Failed to convert value of type java.lang.String to required type java.util.Date异常信息
springboot在接收时间类型的时候,报Failed to convert value of type ‘java.lang.String’ to required type 'java.util.Date’的错误,应该怎么解决呢?
场景:我后台接口接收参数类型为LocalDate,前端传过来是string
错误翻译:
首先上面的错误的意思是 前台传递 string类型的数据,后台使用Date类型去接收,但是报错了。
解决办法:
@GetMapping("demo")
public void
原创
2021-12-17 19:48:45 ·
888 阅读 ·
0 评论