Spring boot springboot动态JPA查询
我有如下疑问Spring boot springboot动态JPA查询,spring-boot,jpa,Spring Boot,Jpa,我有如下疑问 @Query(value="select userid from user_info where name=?1 and phone=?2) List<Integer> findUserBynameAndPhone(String userName, String userPhone); @Query(value=“从user\u info中选择userid,其中name=?1和phone=?2) 列出findUserBynameAndPhone(字符串用户名
@Query(value="select userid from user_info where name=?1 and phone=?2)
List<Integer> findUserBynameAndPhone(String userName, String userPhone);
@Query(value=“从user\u info中选择userid,其中name=?1和phone=?2)
列出findUserBynameAndPhone(字符串用户名、字符串用户电话);
将这些查询转换为从user\u info中选择userid,其中name=userName,phone=userPhone
如何理解此类具有?0?1等的查询您对
如何解释动态查询的意思是什么
?更新了问题是的,索引参数将按照您的预期工作,请参见此处示例