SSM配置Mybatis实现自动获取插入数据的自增id至目标对象中

2019-04-15 18:36发布

Mybatis配置: SELECT LAST_INSERT_ID() insert into contents (id, price, title, pic, summary, detail ) values (#{id,jdbcType=INTEGER}, #{price,jdbcType=DOUBLE}, #{title,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{summary,jdbcType=VARCHAR}, #{detail,jdbcType=LONGVARCHAR} )