elunez / eladmin

eladmin jpa 版本:项目基于 Spring Boot 2.6.4、 Jpa、 Spring Security、Redis、Vue的前后端分离的后台管理系统,项目采用分模块开发方式, 权限控制采用 RBAC,支持数据字典与数据权限管理,支持一键生成前后端代码,支持动态路由
https://eladmin.vip/demo
Apache License 2.0
21.36k stars 7.36k forks source link

启动直接运行报错 #130

Closed kerwinguo closed 5 years ago

kerwinguo commented 5 years ago

从git上clone下代码,直接在ide运行AppRun,报错:

[0;39melAdmin- 2019-09-26 14:07:53 [main] INFO  org.hibernate.Version - HHH000412: Hibernate Core {5.3.7.Final} elAdmin- 2019-09-26 14:07:53 [main] INFO  org.hibernate.cfg.Environment - HHH000206: hibernate.properties not found elAdmin- 2019-09-26 14:07:53 [main] INFO  o.h.annotations.common.Version - HCANN000001: Hibernate Commons Annotations {5.0.4.Final} elAdmin- 2019-09-26 14:07:54 [main] INFO  org.hibernate.dialect.Dialect - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect elAdmin- 2019-09-26 14:07:55 [main] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'default' elAdmin- 2019-09-26 14:07:56 [main] ERROR o.s.b.w.e.tomcat.TomcatStarter - Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'jwtAuthorizationTokenFilter' defined in file [/Users/kerwin/git/eladmin/eladmin-system/target/classes/me/zhengjie/modules/security/security/JwtAuthorizationTokenFilter.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jwtUserDetailsService': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'userMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'me.zhengjie.modules.system.service.mapper.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} elAdmin- 2019-09-26 14:07:56 [main] INFO  o.a.catalina.core.StandardService - Stopping service [Tomcat] elAdmin- 2019-09-26 14:07:56 [main] WARN  o.a.c.loader.WebappClassLoaderBase - The web application [ROOT] appears to have started a thread named [Druid-ConnectionPool-Create-1442249061] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2443) elAdmin- 2019-09-26 14:07:56 [main] WARN  o.a.c.loader.WebappClassLoaderBase - The web application [ROOT] appears to have started a thread named [Druid-ConnectionPool-Destroy-1442249061] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.lang.Thread.sleep(Native Method) com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:2540) elAdmin- 2019-09-26 14:07:56 [main] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat elAdmin- 2019-09-26 14:07:56 [main] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default' elAdmin- 2019-09-26 14:07:56 [main] INFO  c.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed elAdmin- 2019-09-26 14:07:56 [main] INFO  o.s.b.a.l.ConditionEvaluationReportLoggingListener - 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. elAdmin- 2019-09-26 14:07:56 [main] ERROR o.s.b.d.LoggingFailureAnalysisReporter - 


APPLICATION FAILED TO START


Description:

Field userMapper in me.zhengjie.modules.system.service.impl.UserServiceImpl required a bean of type 'me.zhengjie.modules.system.service.mapper.UserMapper' that could not be found.

The injection point has the following annotations:

Action:

Consider defining a bean of type 'me.zhengjie.modules.system.service.mapper.UserMapper' in your configuration.



elunez commented 5 years ago

看文档

kerwinguo commented 5 years ago

感谢,确实在文档常见问题里第二个就是,辛苦作者整理.项目很赞