1.Java代码: 1.1 entity类: User.java public class User { private int userId; private String userName; private String password; private String comment; //这里要添加 setter and getter 略 } 1.2 DAO类: UserDao.java public interface UserDao { public int insertAndGe…
具体xml中sql是这样写,但是要注意SQ_USER.Nextval,SQ_USER是序列,你要替换下自己要进行操作的表的序列,不知道序列的话,可以sql查找下,select * from user_sequences查找全部序列,找到该表单序列名称,或者模糊查询表名select * from user_sequences where SEQUENCE_NAME LIKE '%USER%';,找到序列名称替换SQ_USER即可 <insert id="insertSelective&quo…