Hi I have an endpoint like /findBy
and it can take several query params similar like ;
findBy?color="blue"&size="big"&city="ny"&country="usa"
How can I have such query in repository layer using spring-data-couchbase. Normally if it would something like findByCity
or findByColor
only I would have such methods in my repository
@Repository
public interface HouseRepository extends CouchbaseRepository<House, String> {
House findByColor(String Color);
House findByCity(String City);
}
but in this case I might not get all the parameter values. I want to query whatever values I have. Same findBy
should return the values in these cases:
findBy?country="usa"
findBy?city="ny"&country="usa"
findBy?color="blue"&size="big"
Can such thing be done using spring data couchbase without writing custom sql queries?