在页面对时间操作时报错:nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.util.Date] to type [@org.springframework.format.annotation.DateTimeFormat java.sql.Date]]],提示无法将java.util.Date转换为DateTimeFormat java.sql.Date,经过简单分析,发现后者是我在实体类中加的注解@DateTimeFormat!本想格式化一下时间,没想到反而报错,是我草率了,将这个注解暂时注掉,时间可以正常显示了,只能说还是太年轻啊!
springboot关于日期报错No converter found capable of converting from type [java.util.Date] to type的解决
最新推荐文章于 2022-07-29 13:09:10 发布