问题
某个post接口中传参vo,这个vo使用lombok的@Data注解,可能会报错
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException:
Cannot construct instance of `com.gal.Foo` (no Creators, like
default construct, exist): cannot deserialize from Object value
(no delegate- or property-based Creator)
解决
添加这两个注解即可
@NoArgsConstructor
@AllArgsConstructor