首页 > 解决方案 > spring boot 动态 JPA 查询

问题描述

我有一些像下面这样的查询

@Query(value="select userid from user_info where name=?1 and phone=?2)
List<Integer> findUserBynameAndPhone(String userName, String userPhone);

这些查询是否会翻译为从 user_info 中选择用户 ID,其中 name=userName 和 phone=userPhone ..

如何理解这些具有 ?0 ?1 等的查询

标签: spring-bootjpa

解决方案


推荐阅读