vip-efactory / efadmin

efadmin最初基于eladmin项目改造,实现了CRUD模板,实体属性约束检查,接口国际化,多租户,多条件高级搜索,多表缓存关联一致维护,修改审计等功能。
Apache License 2.0
80 stars 18 forks source link

报错“Did not find a query class vip.efactory.modules.system.domain.QUser for domain class vip.efactory.modules.system.domain.User” #2

Closed wxb2dyj closed 4 years ago

wxb2dyj commented 4 years ago

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dataScope' defined in file [/home/wxb/program/efadmin/efadmin-system/target/classes/vip/efactory/config/DataScope.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'br'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository' defined in vip.efactory.modules.system.repository.UserRepository defined in @EnableJpaRepositories declared on MultiTenantJpaConfiguration: 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 vip.efactory.modules.system.domain.QUser for domain class vip.efactory.modules.system.domain.User!

环境满足文档要求,到处找了都找不到QUser。什么原因?

wxb2dyj commented 4 years ago

解决了。clone下来后,需要mvn clean和mvn compile,否则就会出现上面的报错。

1797890817 commented 4 years ago

在项目的根目录执行:mvn clean install -DskipTests 会自动创建出来!