MyBatis Start Error Mapped statements collection already contains value for com.autoyol.mapper.trans.TransDispatchingMapper resolution

Source: Internet
Author: User

1. Check the sqlsession configuration in the ApplicationContext file. Check the MyBatis configuration file.

2. Check that the Transdispatchingmapper.java is an interface class with no annotations.

3.transdispatchingmapper.xml namespace is the address of the Transdispatchingmapper interface class, this can not be written wrong, otherwise it will error.

4.xml file format requirements Strict, such as greater than, less than, the comment symbol more than a few--the first line of the file left a space, ${} written in parentheses, etc., will error, so in addition to careful or careful, in the development process encountered this problem, wasted 2 hours of the wrong time, the final SQL error.

UPDATE SET update_time=Now (), dispatching_flag=2         , new_owner_no=  #{newownerno], new_car_no=#{newcarno},new_rent_amt=#{newrentamt},new_ Insurance=#{newinsurance}         WHERE order_no= and Car_no =#{carno}

is ${} and not ${], but the start error message also reported vague, error message means that the Sqlmap ID has existed.

MyBatis Start Error mapped statements collection already contains value for Com.autoyol.mapper.trans.TransDispatchingMapper Resolve

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.