Himai Minh wrote:Hi, Must,
I think you may need a CustomAdvertisementRepository interface and its implementation:
Your service or controller can do this:
In your pom, put java persistence dependency
Dave Tolls wrote:Define a method for your repository which takes all the searchable parameters.
You'll then need to add an implementation, inside which use a CriteriaBuilder, adding criteria for each parameter that is supplied.
Something along those lines.
https://www.baeldung.com/spring-data-jpa-query (section 9.2)