mybatis需要手动提交事务,需要在MapConfig文件中设置数据库的字符类型与项目一致
模糊查询:
select * from user where username like ‘%${value}%’
插入时主键的设置:
insert into user(username,birthday,sex,address) values(#{username},#{birthday},#{sex},#{address});
mybatis需要手动提交事务,需要在MapConfig文件中设置数据库的字符类型与项目一致
模糊查询:
select * from user where username like ‘%${value}%’
插入时主键的设置:
insert into user(username,birthday,sex,address) values(#{username},#{birthday},#{sex},#{address});