QueryDslPredicateExecutor Q-class没有生成

时间:2017-10-05 09:26:28

标签: maven querydsl

我的Pom文件是

 <dependency>
            <groupId>com.querydsl</groupId>
            <artifactId>querydsl-apt</artifactId>
            <version>4.0.6</version>
        </dependency> 
<dependency>
            <groupId>com.querydsl</groupId>
            <artifactId>querydsl-jpa</artifactId>
            <version>4.0.6</version>
        </dependency> 

<plugin>
                <groupId>com.mysema.maven</groupId>
                <artifactId>apt-maven-plugin</artifactId>
                <version>1.1.3</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>target/generated-sources</outputDirectory>
                            <processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

在pom.xml中添加了这些依赖项和插件后,我运行了mvn clean install,QAutoManifest没有生成。我是jpa的新手,请帮助我。

public interface AutoManifestRepository extends CrudRepository<AutoManifest,String>,QueryDslPredicateExecutor<AutoManifest>{
}

我的Predicate课程是

public class AutoManifestPredicate {
    private AutoManifestPredicate() {
        System.out.println("Predicate Object gets created");
    }
    static Predicate searchAutoManifest(SearchAutoManifest manifest) {


        return null;
    }
}

0 个答案:

没有答案