Can not issue data manipulation statements with executeQuery()错误解决

如果使用的是jpa框架的话,在Repository层的方法中加上这两段注解:

    @Transactional
    @Modifying
    @Query(value = "UPDATE shop s set s.phone = 1 where s.crawler_shop_number = ?", nativeQuery = true)
    int UpdateDel(String shopNumber);

看了好多答案,都是从底层讲起的,关于这点一直没人说。。。。。。

原文地址:https://www.cnblogs.com/itiande/p/9237372.html