我正在使用spring数据来保存和获取沙发底座。工作
完全可以保存,但是在获取时却会执行“原因:
org.springframework.data.mapping.MappingException:找不到
类型为java.lang.Object的PersistentEntity!”
当我从第1行中删除“对象”字段时,它的工作原理非常完美。
@Data
@NoArgsConstructor
public class UpdatePolicy implements Serializable {
private String docType;
private Object groups; // Line 1
}
//Repository
@Repository
@N1qlPrimaryIndexed
public interface CouchbaseOperations extends
CouchbaseRepository<UpdatePolicy, String> {
}
@Autowired
private CouchbaseOperations couchbaseOperations;
couchbaseOperations.save(updatePolicy ); //works fine
couchbaseOperations.findById(name);//execption throws
我收到“原因:org.springframework.data.mapping.MappingException:找不到类型java.lang.Object的PersistentEntity!”