MyBatis error type interface xxx. Dao is isn't known to the Mapperregistry__mybatis

Source: Internet
Author: User

Today in doing MyBatis, encountered a mistake, we look at this error: Org.apache.ibatis.binding.BindingException:Type interface cn.mybatis_chop10_1. Dao. Iempdao is isn't known to the mapperregistry.

I looked for after looking for, is not find out, the internet has not found a specific solution, so, I began from Mybatis-config.xml to DAO, and then to mapper.xm inside a sentence to see, until I see:

<mapper namespace= "Cn.mybatis_chop10_1.dao. Empmapper ">

This line of time, suddenly dawned, it is the back of the empmapper write wrong, to change it on the line, such as mine is:

<mapper namespace= "Cn.mybatis_chop10_1.dao. Iempdao ">

In this tell everyone, must be careful, careful, and then carefully ... Especially when renaming or ctrl+c,ctrl+v, pay particular attention to ...

Finally in the recommendation: MyBatis Reverse Generation entity class, DAO layer, Mapper: click here

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.