Could not create query metamodel on simple JPA repository

拈花ヽ惹草 提交于 2020-01-04 02:50:11

问题


I defined the following repository

public interface CityVerboseRepository extends JpaRepository<CityVerbose, Integer>{
    List<CityVerbose> findByStreetStartingWith(String street);      
}

corresponding to the entity

@Entity
public class CityVerbose {
    @Id
    public Integer id;

    public String street;
}

but all I am getting is

could not create query metamodel for method public abstract java.util.List

once I am trying to autowire that repository. All my other repositories work just fine...


回答1:


The startingWith syntax is not available in 1.0.3.RELEASE of spring data. Updated to 1.2.0.RELEASE and everything worked fine



来源:https://stackoverflow.com/questions/14482593/could-not-create-query-metamodel-on-simple-jpa-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!