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.