Spring Data JPA Repository
@Query
Employee为类名 非数据库表名
@Query(“select o from Employee o where o.name=:name and o.age=:age”)
public List queryParams(@Param(“name”)String name,@Param(“age”)Integer age)
@Query(“select o from Employee o where o.name=?1 and o.age=?2”)
public List queryParams(String name,Integer age)
使用原生表查询 emplyee为数据库表名
@Query(nativeQuery = true,value=“select count(1) form emplyee”)
public long getCount();