【发布时间】:2018-01-16 20:08:06
【问题描述】:
我在下面的代码中的 findOne 调用中收到argument mismatch; Long cannot be converted to Example<S>:
public Optional<AuditEvent> find(Long id) {
return Optional.ofNullable(persistenceAuditEventRepository.findOne(id))
.map(auditEventConverter::convertToAuditEvent);
}
以上代码正在转换为 Spring 5 和 Spring Boot 2。它在原始 Spring 4 和 Spring Boot 1 应用程序中运行良好。
任何想法我需要将上面的代码转换成什么?
【问题讨论】:
标签: spring spring-boot