jpa升级到3.3.2启动提示 Validation failed for query for method public abstract java.util.List com.ford.fc.parms.parammaster.system.api.repository.BranchRepository.getBranchCodeListData(java.lang.Short,java.time.LocalDate)
org.springframework.boot:3.3.2
spring-boot-starter-data-jpa:3.3.2
@Data
public static class UniqueId implements Serializable {
private static final long serialVersionUID = 1L;
private Short companyBusinessCode;
private String branchCode;
private LocalDate branchEffectiveDate;
}
@Query(name="Branch.getParameterListData")
List<Object[]> getBranchCodeListData(Short coBusCode,LocalDate now);
Branch.getParameterListData = SELECT DISTINCT branchName,branchCode \
FROM Branch A \
WHERE companyBusinessCode = ?1 \
AND branchEffectiveDate=\
(SELECT MAX (branchEffectiveDate) \
FROM Branch \
WHERE companyBusinessCode = ?1 \
AND branchCode = A.branchCode \
AND (branchExpiryDate > ?2 \
OR branchExpiryDate IS NULL))\
升级之前org.springframework.boot是2.7.14 是正常的