Solve java. lang. IllegalArgumentException: Mapped Statements collection does not contain value for xx. xx. error, mappedstatements

Source: Internet
Author: User

Solve java. lang. IllegalArgumentException: Mapped Statements collection does not contain value for xx. xx. error, mappedstatements

I started to figure out the integration of spring and mybatis and found that no data was found when I passed in null when querying all the data. The error was reported as follows:

Java. lang. IllegalArgumentException: Mapped Statements collection does not contain value ....

It has been a headache for a long time. The namespace and interface names on the Internet are inconsistent or the statement id cannot be found.

Later I found a Post saying that I went to the target folder and found all xxxmapper. all xml files fail to be compiled, that is, statement cannot be found during execution, and corresponding SQL cannot be matched. The compilation problem should be caused by a problem in the maven configuration file, find the maven build element:

There are more and more resources-related configurations, but after this configuration, you can directly see the compiled xxx. xml file in the classes directory.

 

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.