Beginner Java9: Learn mybatis times wrong: Parameter ' name ' not found. Available parameters is [1, 0, param1, param2]

Source: Internet
Author: User

Error-->parameter ' name ' not found. Available parameters is [1, 0, param1, param2]

Baidu found this article to complete the modification http://blog.csdn.net/w86440044/article/details/29363067

The operations I wrote earlier were like the bloggers, like this:

1     // Login/Enquiry 2 @Select ("select * from T_users where uname=#{name} and PSWD=#{PSWD}")3 Public Users FINDBYNP (string name, string pswd);

The results of the test pop up the above error, according to the Blogger method modified:

1     // Login/Enquiry 2 @Select ("select * from T_users where uname=#{0} and Pswd=#{1}")3 public users FINDBYNP (string name, string pswd);

Running the test program is normal.

Result: The place can not be used to match the name, there are other reasons?

Beginner Java9: Learn mybatis times wrong: Parameter ' name ' not found. Available parameters is [1, 0, param1, param2]

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.