我有一个看起来像
的实体@Entity
@Getter
@Setter
public class Sheep {
private Slaughter slaughteredBy;
}
我想写一个存储库方法来让所有被屠宰的屠宰者屠杀:
public interface SheepRepository {
public List<Sheep> findAllBySlaughteredBy(Slaughter slaughter);
}
但是当我调用findAllBySlaughteredBy方法时,我得到一个NoSuchElementException:
java.util.NoSuchElementException
at java.util.ArrayList$Itr.next(ArrayList.java:854)
at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1042)
at org.springframework.data.jpa.repository.query.CriteriaQueryParameterBinder.bind(CriteriaQueryParameterBinder.java:63)
答案 0 :(得分:1)
使用public List<Sheep> findAllBySlaughteredBy(Slaughter slaughter);
而不是findAllBy
因为"CFBundleShortVersionString in info.plist must be higher than 1.0"
不是有效的语法