是否可以@Query在一个存储库方法中使用注释和规范?例如,我想要一个像这样的方法:
@Query(value="SELECT e from EMPLOYEE where firstName <> ?1")
public Page<Employee> findEmployeeBySomethigFancy(String firstName, Pageable pageable, Specification<Employee> emp);
Run Code Online (Sandbox Code Playgroud)
是否可以或应该将整个查询构建为Predicate并删除@Query注释?