springboot在运行时找不到域类的查询类

gzszwxb4  于 2021-07-24  发布在  Java
关注(0)|答案(0)|浏览(244)

我试图运行一个gradlespringboot应用程序2.14,在那里我使用了querydsl,我得到了以下错误。在文件夹结构中,我可以看到为querydsl-qpartview.java生成的类,但是springboot容器无法加载它们。有什么线索吗?

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-02-02 21:25:24 [restartedMain] ERROR o.s.b.SpringApplication.reportFailure - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'esnController': Unsatisfied dependency expressed through field 'partService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'partService': Unsatisfied dependency expressed through field 'partViewRepo'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'partViewRepo': Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.jpa.repository.support.QuerydslJpaPredicateExecutor]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Did not find a query class com.ge.digital.oa.moa.domain.QPartView for domain class com.ge.digital.oa.moa.domain.PartView!
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
    at org.springfram

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题