java.lang.ClassNotFoundException: com.*.*.entity.time.Q*

@Entity 实体类 

java.lang.ClassNotFoundException: com.*.*.entity.time.Q*

 

添加依赖

1、添加DSL依赖

<!--query dsl-->
        <dependency>
            <groupId>com.querydsl</groupId>
            <artifactId>querydsl-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>com.querydsl</groupId>
            <artifactId>querydsl-apt</artifactId>
            <scope>provided</scope>
        </dependency>
        <!--query dsl end-->

 

2、添加插件

 

<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.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

 

posted @ 2019-10-17 17:48  天王星天  阅读(496)  评论(0编辑  收藏  举报