eclipse中的Spring数据Querydsl不生成查询类型类 [英] Spring data Querydsl in eclipse not generating query type classes

查看:27
本文介绍了eclipse中的Spring数据Querydsl不生成查询类型类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有看到在 eclipse 中生成的查询 dsl 类在 pom.xml 中添加以下依赖项和插件.有人可以查看以下 Spring Boot 中 query-dsl 集成所需的更改吗?

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>

`

推荐答案

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

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.

这篇关于eclipse中的Spring数据Querydsl不生成查询类型类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆