小编典典

Eclipse中的Spring数据Querydsl无法生成查询类型类

spring-boot

我没有看到在eclipse中生成的查询dsl类添加到pom.xml中的依赖项和插件下面。能否请您检查一下以下内容,以便在Spring
Boot中整合query-dsl?

<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>

`


阅读 298

收藏
2020-05-30

共1个答案

小编典典

在Eclipse中,有时您必须多次刷新项目才能看到生成的源。如果没有尝试通过生成文件

right click on your project -> run as -> maven generate sources.
2020-05-30