<dependency> <groupId>com.querydsl</groupId> <artifactId>querydsl-codegen</artifactId> <version>${querydsl.version}</version> </dependency> <build> <plugins> <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.QuerydslAnnotationProcessor</processor> <options> <querydsl.packageSuffix>.query</querydsl.packageSuffix> <querydsl.queryClassPrefix>Q</querydsl.queryClassPrefix> </options> </configuration> </execution> </executions> </plugin> </plugins> </build> List<User> users = new JPAQueryFactory(entityManager) .select(qUser) .from(qUser) .where(qUser.name.eq("John Doe")) .fetch();


上一篇:
下一篇:
切换中文