标签:str close nec let 查找 关闭 update jdbc ons
Session用于事务管理、增删查改等,相当于JDBC的Connection。可使用Transaction代替事务操作。
Session只能通过SessionFactory获取
Session不建议多线程共享使用。
session.beginTransaction();
session.getTransaction().commit();
session.close();
StudentEntity studentEntity=new StudentEntity("0123456","male",32);
//将0123456对应的记录替换为{"0123456","male",28}
StudentEntity studentEntity=new StudentEntity("0123456","male",28);
标签:str close nec let 查找 关闭 update jdbc ons
原文地址:https://www.cnblogs.com/AlMirai/p/12546211.html