Spring数据JPA查询需要“%”字符以及
like查询中的空格字符,如
@Query("Select c from Registration c where c.place like %:place%")。cf. http://docs.spring.io/spring-
data/jpa/docs/current/reference/html。
您可能希望完全摆脱
@Query注释,因为它看起来类似于标准查询(由spring数据代理自动实现);即使用单行
List<Registration> findByPlaceContaining(String place);
足够了。



