"Spring Boot" mybatis start error: Consider defining a bean of type ' com.newhope.interview.dao.UserMapper ' in your configuration.

Source: Internet
Author: User

Start Error:

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 beans 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 Applic Ationcontext. 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 is could not being found. Action:consider defining a bean of type ' com.newhope.interview.dao.UserMapper ' in your configuration.

Solution:

Https://www.cnblogs.com/JealousGirl/p/bean.html

====================================

Not completed

"Spring Boot" mybatis start error: Consider defining a bean of type ' com.newhope.interview.dao.UserMapper ' in your configuration.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.