Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot springboot动态JPA查询_Spring Boot_Jpa - Fatal编程技术网

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等的查询

您对
如何解释动态查询的意思是什么
?更新了问题是的,索引参数将按照您的预期工作,请参见此处示例