Jackson 序列化与反序列化:Date vs. LocalDate 以及版本差异遇到的问题在低版本的Spring项目中,使用LocalDate对象进行序列化和反序列化时,(作为dto和vo时),会出现序列化时抛出异常的情况。
Type definition error: [simple type, class java.time.LocalDate]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of java.time.LocalDate (no Creators, like default constructor, exist): no String-argument constructor;factory method to deserialize from String value (--)\n at [Source: (PushbackInputStrea ...