I have the following code which uses Specification
to build complex where clause.
public interface EmployeeRepository extends
CrudRepository<Employee, String>,
JpaSpecificationExecutor<Employee> {
}
public class Service {
@Autowired
private EmployeeRepository employeeRepository;
public List<Employee> test() {
return employeeRepository.findAll(where(hasNames(List.of("Tom", "Jerry"))).and(hasAges(List.of(20,21))));
}
}
I'm trying to convert this code to reactive using the r2dbc. I replaced CrudRepository
with ReactiveCrudRepository
. However in order to build the complex where clause I need to use Specification
. I don't see a reactive version of JpaSpecificationExecutor
public interface EmployeeRepository extends
ReactiveCrudRepository<Employee, String>,
JpaSpecificationExecutor<Employee> { // is there ReactiveJpaSpecificationExecutor?
}
Is there a reactive version of JpaSpecificationExecutor, or a way to build such where clause in reactive?