springboot jpa sql查询与传值

public interface ARepository extends PagingAndSortingRepository<A, APK>, JpaSpecificationExecutor<A> {
@Query(value="select field1, field2 from table1 WHERE param1=:param1", nativeQuery=true)
    List<Object[]> method1(@Param("param1") String param1);
}

猜你喜欢

转载自www.cnblogs.com/white-knight/p/9009129.html