【spring boot】mybatis启动报错:Consider defining a bean of type 'com.newhope.interview.dao.UserMapper' in your configuration.
2018-02-24 23:09
645 查看
启动报错:
解决方案:
https://www.cnblogs.com/JealousGirl/p/bean.html
====================================
未完结
2018-02-24 22:41:00.442 WARN 2952 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController': 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 'com.newhope.interview.dao.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} 2018-02-24 22:41:00.444 INFO 2952 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2018-02-24 22:41:00.465 INFO 2952 --- [ main] utoConfigurationReportLoggingInitializer : Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 2018-02-24 22:41:00.564 ERROR 2952 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: Field userMapper in com.newhope.interview.service.impl.UserServiceImpl required a bean of type 'com.newhope.interview.dao.UserMapper' that could not be found. Action: Consider defining a bean of type 'com.newhope.interview.dao.UserMapper' in your configuration.
解决方案:
https://www.cnblogs.com/JealousGirl/p/bean.html
====================================
未完结
相关文章推荐
- 使用Spring Boot +JPA+mybatis快速启动一个web项目
- SpringBoot整合Mybatis,多数据源,事务,支持java -jar 启动.
- spring boot启动时mybatis报循环依赖的错误(推荐)
- spring_boot整合mybatis项目启动时报错
- springboot启动mybatis
- 关于Springboot整合mybatis启动的问题
- 在 Spring Boot @Configuration 注解类中使用 Mybatis 查询数据库启动报错
- spring boot集成mybatis,启动报无法创建dataSource问题
- SpringCloud SpringBoot mybatis 分布式微服务(十九)springboot在启动时注入了哪些bean
- shiro+spring boot+mybatis启动循环引用问题解决思路和方案
- spring boot启动 Unregistering JMX-exposed beans on shutdown
- Spring Boot启动过程源码分析
- springboot + mybatis-pagehelper 参数查询不分页的bug。。。
- springboot+sqlite+maven+mybatis
- springBoot整合Mybatis
- spring boot成功启动后访问报错404的问题
- shell 启动运行springboot项目 判断项目是否成功启动运行
- springboot+mybatis+SpringSecurity 实现用户角色数据库管理(一)
- SpringBoot启动过程分析
- Spring Boot 实用MyBatis做数据库操作