Mybatis问题:There is no getter for property named 'Stringname' in 'class java.lang.String&
2017-03-02 22:00
260 查看
分析:
那么什么情况下会发生“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>
相关文章推荐
- Mybatis多参数传入问题
- Mybatis解决空字符串保存入Mysql数字字段的类型转换问题
- MyBATIS(即iBATIS)问题集
- MyBatis中的N+1问题——MyBatis学习笔记之十四 推荐
- mybatis.net - 3 mybatis.net 的命名空间问题
- mybatis使用foreach批次插入,解决sequence只查询一次的问题
- MyBatis中出现Mapped Statements collection does not contain value 问题
- mybatis中编译报错的的问题(我的问题是里面有大于号小于号)
- mybatis insert操作返回值问题
- MyBatis的SqlSessionFactory的创建问题
- 解决mybatis resultMap共享问题
- MyBatis+spring遇到的问题
- mybatis的foreach语句使用问题
- MyBatis的SqlSessionFactory的创建问题
- MyBatis的SqlSessionFactory的创建问题
- spring3+ mybatis出现的问题
- 使用mybatis遇到的问题
- MyBATIS(即iBATIS)问题集
- MyBatis 问题
- mybatis-spring集成:配置多数据库源中遇到的问题