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> |             <artifactId>querydsl-mongodb</artifactId> | ||||||
|             <version>${querydsl.version}</version> |             <version>${querydsl.version}</version> | ||||||
|         </dependency> |         </dependency> | ||||||
|  |         <dependency> | ||||||
|  |             <groupId>com.mysema.querydsl</groupId> | ||||||
|  |             <artifactId>querydsl-apt</artifactId> | ||||||
|  |             <version>3.6.6</version> | ||||||
|  |         </dependency> | ||||||
| 
 | 
 | ||||||
|     </dependencies> |     </dependencies> | ||||||
| 
 | 
 | ||||||
|     <build> |     <build> | ||||||
|         <plugins> |         <plugins> | ||||||
|             <plugin> |             <plugin> | ||||||
|                 <artifactId>maven-compiler-plugin</artifactId> |                 <groupId>com.mysema.maven</groupId> | ||||||
|                 <version>2.3.2</version> |                 <artifactId>apt-maven-plugin</artifactId> | ||||||
|  |                 <version>1.1.3</version> | ||||||
|  |                 <executions> | ||||||
|  |                     <execution> | ||||||
|  |                         <goals> | ||||||
|  |                             <goal>process</goal> | ||||||
|  |                         </goals> | ||||||
|                         <configuration> |                         <configuration> | ||||||
|                     <source>1.8</source> |                             <outputDirectory>target/generated-sources/java</outputDirectory> | ||||||
|                     <target>1.8</target> |                             <processor>org.springframework.data.mongodb.repository.support.MongoAnnotationProcessor</processor> | ||||||
|                         </configuration> |                         </configuration> | ||||||
|  |                     </execution> | ||||||
|  |                 </executions> | ||||||
|             </plugin> |             </plugin> | ||||||
|         </plugins> |         </plugins> | ||||||
|     </build> |     </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.annotation.Id; | ||||||
| import org.springframework.data.mongodb.core.mapping.Document; | import org.springframework.data.mongodb.core.mapping.Document; | ||||||
| 
 | 
 | ||||||
|  | import com.mysema.query.annotations.QueryEntity; | ||||||
|  | 
 | ||||||
|  | @QueryEntity  | ||||||
| @Document | @Document | ||||||
| public class User { | public class User { | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user