最近在使用hibernate+spring的时候,在update时,遇到一些问题,这里记录一下。
一般常用的DML:Data Manipulation Language 数据操纵语言,对表的数据进行操作,(insert、update、delete )语句 和 DCL:Data Control Language 数据库控制语言(创建用户、删除用户、授权、取消授权)语句 和 DDL:Data Definition Language 数据库定义语言,对数据库内部的对象进行创建、删除、修改的操语句,均是使用MySQL提供的公共接口mysql_execute_command,来执行相应的SQL语句。
在Spring配置文件中,添加如下配置,这个配置的作用,就是管理当前的session,针对一些需要事务支持的操作,自动提交。
xsi:schemaLocation="http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd"
xmlns:tx="http://www.springframework.org/schema/tx"
<bean id="