jpa

最新文章

Spring JPA报错:Not supported for DML operations

在一个Spring JPA项目中,执行更新或删除是报错:Not supported for DML operations解决方法:只需要添加注解@Modifying即可。@Modifying@Query(value = "update User user set user.address = :address where user.id = :id ")void updateUserAddress

Spring Boot 配置MySQL数据库重连

使用jdbc连接MySQL,如果连接失效,可能会报类似的错误:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 84,371,623 milliseconds ago. The last packet sent suc