报错信息:

2018-06-25 14:26:17.103  WARN 49752 --- [  restartedMain] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'centerController': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userService': Unsatisfied dependency expressed through field 'userMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.dao.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2018-06-25 14:26:17.105  INFO 49752 --- [  restartedMain] o.apache.catalina.core.StandardService   : Stopping service Tomcat
2018-06-25 14:26:17.119  INFO 49752 --- [  restartedMain] utoConfigurationReportLoggingInitializer :

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2018-06-25 14:26:17.228 ERROR 49752 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

Field userMapper in com.service.UserService required a bean of type 'com.dao.UserMapper' that could not be found.

Action:

Consider defining a bean of type 'com.dao.UserMapper' in your configuration.

解决方法:

1.检查接口类有没加上注解@Mapper

2. springboot启动报错:Field userMapper in com.service.UserService required a bean of type 'com.dao.UserMapper' that could not be found.的更多相关文章

  1. SpringBoot启动报错Failed to determine a suitable driver class

    SpringBoot启动报错如下 Error starting ApplicationContext. To display the conditions report re-run your app ...

  2. springboot 启动报错"No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available"

    1.问题 springboot启动报错 "D:\Program Files\Java\jdk-11\bin\java.exe" -XX:TieredStopAtLevel=1 -n ...

  3. SpringBoot启动报错:ould not be registered. A bean with that name has already been defined in file and overriding is disabled.

    SpringBoot启动报错 ***************************APPLICATION FAILED TO START*************************** Des ...

  4. SpringCloud报错: "Field discoveryClient in com.controller.DcController required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found."

    SpringCloud报错: "Field discoveryClient in com.controller.DcController required a bean of type 'c ...

  5. springboot 启动报错Consider defining a bean of type 'com.example.springbootdruid.mapper.UserMapper' in your configurati

    一.问题 springboot项目启动时报错: Field userMapper in com.example.springbootdruid.service.impl.UserServiceImpl ...

  6. 《Springboot极简教程》问题解决:Springboot启动报错 Whitelabel Error Page: This application has no explicit mapping for(转)

    13.2 Spring Boot启动报错:Whitelabel Error Page 13.2 Spring Boot启动报错:Whitelabel Error Page 问题描述 Whitelabe ...

  7. springboot启动报错:Failed to configure a DataSource

    一.背景 springboot的出现,让项目搭建变得更方便快捷,同时简化掉很多的样板化配置代码,提高开发效率. 通过idea生成springboot项目,启动报错:Failed to configur ...

  8. springboot启动报错:Could not resolve placeholder

    SpringBoot1.5,项目启动报错: Could not resolve placeholder 很明显是找不到配置文件引起的,查看配置文件目录结构如下: 很正常呀. 完全可以加载applica ...

  9. springboot启动报错start bean 'eurekaAutoServiceRegistration' NullPointerException

    解决方案参考:https://blog.csdn.net/hhj13978064496/article/details/82825365 我将eureka的依赖包放到了依赖包的最下面,启动报错, 如下 ...

随机推荐

  1. 在Outlook客户端使用SSL加密,弹出安全证书警告的解决方法。

    这是使用自己的域名.第三方的邮件系统是产生的问题. 如万网的邮箱系统,但在Outlook中,设置的pop3/imap/smtp的域名是你自己的域名. imap.youname.domain pop3. ...

  2. C++进阶--构造函数和析构函数中的虚函数

    //############################################################################ /* 任何时候都不要在构造函数或析构函数中 ...

  3. 《Java并发编程实战》笔记-Happens-Before规则

    Happens-Before规则 程序顺序规则.如果程序中操作A在操作B之前,那么在线程中A操作将在B操作之前执行. 监视器锁规则.在监视器锁上的解锁操作必须在同一个监视器锁上的加锁操作之前执行. v ...

  4. dubbo项目部署遇到的问题

    部署的项目结构如下: [图片] 1 Socket >>>相关的报错 检查下zookeeper的服务端cmd和客户端cmd是否起来了 2 jdbc.DataSourceProperti ...

  5. [UE4]运行模式

    Selected Viewport和Simulate都可以在游戏模式和漫游模式之间切换. Selected Viewport:默认是游戏模式. Simulate:默认是漫游模式. 按Ctrl+F1后, ...

  6. [VS工具]远程在IIS附加调试代码

    1.首先在服务器以管理员的方式打开msvsmon.exe(一般这个文件路径:C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\ID ...

  7. Hibernate SQL

    SQL查询: 5.2之后的版本: NativeQuery<Order> sqlQuery = session.createNativeQuery("select * from t ...

  8. JS一个算法题

    题目:实现超出整数存储范围的两个大整数想加function(a,b).注意:参数a和b以及函数返回值都是字符串. 目的:考算法, 基本逻辑. 我实现的基本思路是: ①两个数字字符串长度补成一样,用字符 ...

  9. CS229 7.1应用机器学习中的一些技巧

    本文所讲述的是怎么样去在实践中更好的应用机器学习算法,比如如下经验风险最小化问题: 当求解最优的  后,发现他的预测误差非常之大,接下来如何处理来使得当前的误差尽可能的小呢?这里给出以下几个选项,下面 ...

  10. Android WebView无法播放视频或直播,关闭界面后任在播放的问题;

    1.设置webview属性: webView.setWebChromeClient(new MyWebChromeClient());         webSettings = webView.ge ...