org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'leader

总结:mybatis传单个类型参数(String、Integer),在dao层方法中可以不用@param注解,前提是xml中不含有条件表达式(when,if..标签中没有引用到该参数)

1、错误信息:

org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'leader

 

 2、mapper.xml、dao方法:

org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'leader     org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'leader

 

3、如果把mybatis的<if>标签去掉,就可以正常运行并接收传递的参数。如果想要使用条件表达式,那就要在dao层方法中加@Param("leader")

org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'leader

 

 4、加标签后运行正常!

 

上一篇:DNS配置 for centos7


下一篇:Linux进程控制