Querydsl with Spring Boot, Hibernate & Gradle

Querydsl is a framework which supports writing type safe queries with back-end services like JPA, MongoDB, SQL and etc.

Rather than constructing queries with String or XML, we can leverage Querydsl’s fluent API for the type safety.
I faced few difficulties in configuring Querydsl in Gradle. Querydsl needs generated model classes from the Hibernate model classes.

However, to do this job, a plugin is required. For Maven that plugin is maintained by Mysema,which also maintains Querydsl. This is the link for Gradle plugin developed by ewerk(I found the website broken).  Some tweaks are needed to make this plugin work with Gradle 5 and onwards.
The following is a build.gradle file – 

Read more