- 在运行JPA修改数据代码报 Not supported for DML operations 错误
@Query(value = "update User user set user.address = :address where user.id = :id ")
void findByUpdateUser(@Param("id") int id,@Param("address") String address);
解决办法就是在上面加上@Modifying 修改注解
@Modifying
@Query(value =