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...
The startingWith
syntax is not available in 1.0.3.RELEASE of spring data. Updated to 1.2.0.RELEASE and everything worked fine
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.