1. 程式人生 > 其它 >QueryDsl整合JPA報錯Failed to instantiate [org.springframework.data.jpa.repository.support

QueryDsl整合JPA報錯Failed to instantiate [org.springframework.data.jpa.repository.support

技術標籤:jpa錯誤日誌jpa

報錯摘要

com.example.security.entity.QUserEntity
Failed to instantiate [org.springframework.data.jpa.repository.support
 Error creating bean with name 'querydslBindingsFactory' defined in class path
Failed to instantiate [org.springframework.data.web.querydsl 
Error creating bean with name 'requestMappingHandlerAdapter'
defined in class path resource

經過查資料啊 q實體沒有新增
但是我compile了啊
原來是忘記裝外掛了

<!--該外掛可以生成querysdl需要的查詢物件,執行mvn compile即可-->
            <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>