zoukankan      html  css  js  c++  java
  • hibernate4 无法保存 不报错

    务必检查这个部分。上面这个写法就无法保存,下面的就可以保存。具体技术原因,可以网上搜一下掌握事务配置的具体含义。

    1 <tx:advice id="txAdvice" transaction-manager="txManager">
    2         <tx:attributes>
    3             <tx:method name="save*" propagation="REQUIRED" />
    4             <tx:method name="update*" propagation="REQUIRED" />
    5             <tx:method name="delete*" propagation="REQUIRED" />
    6             <tx:method name="login*" propagation="REQUIRED" />
    7             <tx:method name="*" read-only="true" />
    8         </tx:attributes>
    9     </tx:advice>
     1 <tx:advice id="txAdvice" transaction-manager="txManager">
     2 <tx:attributes>
     3 <tx:method name="save*" propagation="REQUIRED" />
     4 <tx:method name="update*" propagation="REQUIRED" />
     5 <tx:method name="delete*" propagation="REQUIRED" />
     6 <tx:method name="login*" propagation="REQUIRED" />
     7 <tx:method name="executeUpdate*" propagation="REQUIRED" />
     8 <tx:method name="run" propagation="NOT_SUPPORTED" />
     9 <tx:method name="*" read-only="true" />
    10 </tx:attributes>
    11 </tx:advice>
  • 相关阅读:
    bzoj1996
    bzoj2839
    bzoj1304
    bzoj1097
    bzoj4547
    bzoj3379
    bzoj3090
    树莓派/Debian 构建LAMP Web服务器并搭建WordPress博客(一)
    树莓派/Debian Apache2 配置自建 CA 实现 HTTPS(SSL) 服务
    树莓派/Debian Apache2 实现 HTTPS(SSL) 服务
  • 原文地址:https://www.cnblogs.com/nanahome/p/9182806.html
Copyright © 2011-2022 走看看