那么什么情况下会发生“There is no getter for property named in ‘class java.lang.String’”错误呢?
其实是在这种情况下:
<select id="getRiskMember" resultMap="BaseResultMap" parameterType="String"> <include refid="selectMember"/> and safetylevel > 1 and stauts = 1 <if test="username != null"> and username = #{username} </if> </select>
注意看,是在if test=验证的时候发生的 “There is no getter for property named in ‘class java.lang.String’”,
而并非是and username = #{username} 的时候发生的错误。
<select id="getRiskMember" resultMap="BaseResultMap" parameterType="String"> <include refid="selectMember"/> and safetylevel > 1 and stauts = 1 <if test="_parameter != null"> and username = #{username} </if> </select>
本文出自 “11100713” 博客,请务必保留此出处http://11110713.blog.51cto.com/11100713/1902794
Mybatis问题:There is no getter for property named 'Stringname' in 'class java.lang.String'
原文:http://11110713.blog.51cto.com/11100713/1902794