jpa在进行update的时候 报错:could not extract ResultSet

org.hibernate.exception.GenericJDBCException: could not extract ResultSet 没有找到结果集

Can not issue data manipulation statements with executeQuery().
不能发出数据操纵语句与executeQuery()

后来查资料 发现 ,jpa 在进行update() 方法的时候需要 添加@Modifying注解 ,这样程序才知道 是要进行修改操作
同时要添加事物的管理
@Modifying
@query(“sql”)
jpa在进行update的时候 报错:could not extract ResultSet