QueryDsl - How to create Q classes with maven?

前端 未结 1 879
长发绾君心
长发绾君心 2020-12-19 08:01

I have web project spring mvc with spring data
here is example :
https://github.com/prilia/SpringJpa-Quarydsl-Test/tree/master/JpaSpringQuarydsl

I checked

1条回答
  •  借酒劲吻你
    2020-12-19 08:43

    you need plugin, try this:

                    
                        com.mysema.maven
                        maven-apt-plugin
                        1.0.4
                        
                            
                                process-common-model
                                
                                    process
                                
                                generate-sources
                                
                                    ${project.build.directory}/{yourSourceDir}
                                
                            
                        
                        
                            target/generated-sources/querydsl
                            
                                com.mysema.query.apt.jpa.JPAAnnotationProcessor
                            
                            
                                true
                                true
                                .qdsl
                            
                        
                    
    

    I copied this from my project. just added it to your pom and have a try.

    There are additional options in the code above, if you just wanna a simple one, focus on the querydsl reference

    0 讨论(0)
提交回复
热议问题