spring-boot - 调用 findAll(pageable) 时未找到类型 [Type] 的属性 [propertyName]
问题描述
@Entity
@Table(name = "report_type")
public class ReportType implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private String id;
@NotNull
@Column(name = "report_name")
private String reportName;
@NotNull
@Column(name = "active")
private boolean active;
@NotNull
@Column(name = "report_id")
private String reportId;
}
ReportTypeService.java
包含:
public Page<ReportType> findAll(Pageable pageable) {
return reportTypeRepository.findAll(pageable);
}
我得到的错误是
service.ReportTypeService.findAll() with cause = 'NULL' and exception = 'No property report found for type ReportType! Did you mean 'reportId'?'
org.springframework.data.mapping.PropertyReferenceException: No property report found for type ReportType! Did you mean 'reportId'?
从错误消息中,我的理解是 Spring boot 正在寻找字段report
,但它不存在,但我没有通过任何东西pageable
,任何人都可以帮忙吗?
解决方案
推荐阅读
- oauth-2.0 - 我实施 OAuth/OpenId 有多差?
- java - JSON序列化为不同的值
- c - 如何使用 Makefile 创建链接到静态库的可执行文件?
- r - R:如何舍入数据框的值
- c# - 通过 ADO 库更新 git 子模块
- react-native - 具有初始路由的反应导航多堆栈导航器
- r - 将原始格式的压缩 CSV 文件中的数据直接读取到内存中?
- python - Numpy矩阵创建时间奇点
- python - 为什么在我的 INSERT INTO 语句末尾附加 BETWEEN AND 时会收到 MariaDB 语法错误?
- azure - Azure SDK for JS“虚拟机 - 列表”是否存在?