mybatis插入出现org.apache.ibatis.executor.ExecutorException: No setter found for the keyProperty 'xxx'异常的原因


确定有setter方法,问题其实是xml文件中,insert的主键的列名写错了,如下,一开始写成ComId

<insert id="insertCom" parameterType="Comment" useGeneratedKeys="true" keyProperty="comId">


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM