[Solved] Mapped Statements collection does not contain value for xxx

Background: newcomers are learning to use PageHelper plug-in to realize back-end paging. This problem occurs when calling.

Solution: I searched many articles on the Internet and found that either the namespace setting in systemusermapper.xml file is wrong or the resulttype is wrong. It is still wrong to try these methods one by one. When viewing an article, I found that the project file directory on the left is different from mine. As shown below, the left is someone else’s and the right is mine:

         

It can be clearly seen that my systemusermapper.xml is placed under lyj, which makes the method of writing this file unusable. As shown in the above figure on the left, systemusermapper.xml should be placed under the mapper package built by resource, so that no error will be reported. The postman test can accurately realize paging, as follows:

Read More: