Added support auto generating Q classes for QueryDSL
This commit is contained in:
parent
686769e99d
commit
56cba00c7d
|
@ -71,18 +71,31 @@
|
|||
<artifactId>querydsl-mongodb</artifactId>
|
||||
<version>${querydsl.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-apt</artifactId>
|
||||
<version>3.6.6</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
<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>org.springframework.data.mongodb.repository.support.MongoAnnotationProcessor</processor>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
package org.baeldung.model;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
|
||||
import com.mysema.query.types.path.EntityPathBase;
|
||||
import com.mysema.query.types.path.StringPath;
|
||||
|
||||
@Generated("com.mysema.query.codegen.EntitySerializer")
|
||||
public class QUser extends EntityPathBase<User> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final QUser user = new QUser("user");
|
||||
|
||||
public final StringPath name = createString("name");
|
||||
|
||||
public QUser(String variable) {
|
||||
super(User.class, variable);
|
||||
}
|
||||
}
|
|
@ -3,6 +3,9 @@ package org.baeldung.model;
|
|||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
||||
import com.mysema.query.annotations.QueryEntity;
|
||||
|
||||
@QueryEntity
|
||||
@Document
|
||||
public class User {
|
||||
|
||||
|
|
Loading…
Reference in New Issue