碼迷,juhua225334.cn
首頁 > 移動開發 > 詳細

【spring boot】mybatis啟動報錯:Consider defining a bean of type 'com.newhope.interview.dao.UserMapper' in your configuration.

時間:2018-02-25 00:13:23      閱讀:18017      評論:0      收藏:0      [點我收藏+]

标簽:ida   eal   ror   through   expected   field   standard   deb   cep   

啟動報錯:

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】mybatis啟動報錯:Consider defining a bean of type 'com.newhope.interview.dao.UserMapper' in your configuration.

标簽:ida   eal   ror   through   expected   field   standard   deb   cep   

原文地址:https://www.cnblogs.com/sxdcgaq8080/p/8467965.html

(13)
(3)
   
舉報
評論 一句話評論(0
登錄後才能評論!
© 2014 juhua225334.cn 版權所有 京ICP備13008772号-2
迷上了代碼!
http://m.juhua225334.cn|http://wap.juhua225334.cn|http://www.juhua225334.cn||http://juhua225334.cn