Skip to content
Advertisement

Tag: spring-data

Handle optional parameters in QueryDSL

I am using QueryDSL with SpringData. I have Table say, Employee and I have created entity class say, EmployeeEntity I have written following service method As in above I commented the NPException. How to use QueryDSL for optional Parameters in QueryDSL using Spring Data? Thank you 🙂 Answer BooleanBuilder can be used as a dynamic builder for boolean expressions:

What is difference between CrudRepository and JpaRepository interfaces in Spring Data JPA?

What is the difference between CrudRepository and JpaRepository interfaces in Spring Data JPA? When I see the examples on the web, I see them there used kind of interchangeably. What is the difference between them? Why would you want to use one over the other? Answer JpaRepository extends PagingAndSortingRepository which in turn extends CrudRepository. Their main functions are: CrudRepository mainly

Advertisement