org.mybatis.spring.MyBatisSystemException(参数找不到问题)

来源:互联网 发布:手机淘宝网首页 编辑:程序博客网 时间:2024/05/01 21:00

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException

出现参数找不到的问题


要注意dao层方法中,出现多个参数(参数类型不一致),在MyBatis配置文件中就要对参数进行类型声明

void updateEquipment(@Param("equID") Integer equID ,@Param("equName") String equName);

<update id="updateEquipment">

update equipment set equName = #{equName,jdbcType=VARCHAR} where equID = #{equID,jdbcType=INTEGER}

</update>

注意:

当dao层方法中,只有一个参数,可以不使用@Param,当有多个参数时要使用

参考地址:http://blog.csdn.net/u014079773/article/details/51865492

阅读全文
0 0
原创粉丝点击