I don't see query dsl classes generated in eclipse added below dependency and plugin in the pom.xml. Can some please review below change required for query-dsl integration in spring boot?
<dependency>
<groupId>com.mysema.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>${querydsl.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mysema.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId>
<version>${querydsl.version}</version>
</dependency>
<!--Plugin for query-dsl -->
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
</execution>
</executions>
</plugin>
`
In eclipse, sometimes you have to refresh your project multiple times to see the generated-sources. If not try to generate the files by
right click on your project -> run as -> maven generate sources.
This problem is due to annotation processing of M2E. New Eclipse versions contain an experimental feature, which delegates annotation processing to maven plugins and thus behaves the same as using mvn from the command line.
To enable the feature:
Maven -> Annotation ProcessingConfigure Workspace Settings
Experimental: Delegate annotation processing to maven plugins (for maven processor only).
This way Eclipse processes annotations with the plugins defined in the pom.xml. Resources are now generated when building the project and also found as dependency. No need to build the project manually with maven.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With