我们已经使用maven插件在项目中配置了QueryDSL的生成:
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.0</version>
<configuration>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
<dependencies>
<dependency>
<groupId>com.mysema.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>${querydsl.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
在某些时候,我们在项目中进行了更改,并且生成过程开始因以下错误而失败:
cannot find symbol import xxx.xxxx.xxxx.domain.QContact;
经过一番调查,此问题是由一个已被完全注释的类引起的。
例如:
//package xxx.xxxx.xxxxx;
////
//public class Test {
////
//}
如果将这样的类放入域包中,则生成过程将失败。
好的,另一方面,您的项目中不必存在此类。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句