MyBatis Package There is no getter for property named ' XXX ' in ' Class java.lang.String '

Source: Internet
Author: User

I. Discovering problems

<!--standard material stock inquiry--><select id= "Selectbzwzkucun" resulttype= "Com.labway.portal.po.X_bzwz_kucun" param Etertyp E= "String" >select bzwzname, SUM (buynumber) as Stocknumber from X_bzwz_ruku Group by Bzwzname <if test= "Name!=null an D name!= "> have bzwzname like '% ' | | #{name}| | ' % ' </if> </select>mybatis query passed in a string pass argument, reported there is no getter for property named ' Num ' in ' Class java.lang.String ' 。 Second, solve the problem

<!--standard material stock enquiry-

<select id= "Selectbzwzkucun" resulttype= "Com.labway.portal.po.X_bzwz_kucun" parametertype= "String" >

Select Bzwzname, sum (buynumber) as Stocknumber from X_bzwz_ruku Group by Bzwzname

<if test= "name_parameter!=null and name_parameter! =" "> have bzwzname like '% ' | | #{name_parameter}| | ' % ' </if>

</select>

Regardless of the parameter name, change to "_parameter".

Three. cause Analysis

MyBatis by default with ONGL parsing parameters, so the object tree will automatically take the form of string.name values, causing error. The public List methodName (@Param (value= "name") String name can also be used to describe the parameter value

This article is from the "Big Talk Program" blog, please be sure to keep this source http://houqida.blog.51cto.com/8877896/1582274

MyBatis Package There is no getter for property named ' XXX ' in ' Class java.lang.String '

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.