首先给大家分享一个巨牛巨牛的人工智能教程,是我无意中发现的。教程不仅零基础,通俗易懂,而且非常风趣幽默,还时不时有内涵段子,像看小说一样,哈哈~我正在学习中,觉得太牛了,所以分享给大家!点这里可以跳转到教程
解决方案:
引起问题的原因是因为在SQL语句中定义的参数与实体中定义的属性不一致 导致的,
比如DAO方法定义的是:
public void addVoteContent(VoteContent voteContent);
SQL语句如下:
<!-- 删除用户(逻辑删除) -->
<insert id="addVoteContent" parameterType="com.lin.entity.VoteContent">insert into vote_content(content,count,theme_id)value(#{content},#{count},#{theme_id})</insert>
UserEntity的定义:
public class VoteContent { private Integer contentId; private String content; private Integer count;private Integer themeId;}
这个#{theme_id}并不在VoteContent 中存在,而themeId是存在的,如果使用VoteContent中不存在theme_id的属性所以会报此错误。改成themeId问题即可解决。