项目中碰到的问题: 解决方法: 实体类没有提供构造函数,@Data并不能自动生成构造函数,需要在类添加两个构造函数注解。 @AllArgsConstructor //全参构造函数 @NoArgsConstructor //无参构造函数