<legend id='jdbOE'><style id='jdbOE'><dir id='jdbOE'><q id='jdbOE'></q></dir></style></legend>
    <bdo id='jdbOE'></bdo><ul id='jdbOE'></ul>
  • <tfoot id='jdbOE'></tfoot>

      <small id='jdbOE'></small><noframes id='jdbOE'>

      1. <i id='jdbOE'><tr id='jdbOE'><dt id='jdbOE'><q id='jdbOE'><span id='jdbOE'><b id='jdbOE'><form id='jdbOE'><ins id='jdbOE'></ins><ul id='jdbOE'></ul><sub id='jdbOE'></sub></form><legend id='jdbOE'></legend><bdo id='jdbOE'><pre id='jdbOE'><center id='jdbOE'></center></pre></bdo></b><th id='jdbOE'></th></span></q></dt></tr></i><div id='jdbOE'><tfoot id='jdbOE'></tfoot><dl id='jdbOE'><fieldset id='jdbOE'></fieldset></dl></div>
      2. @Transactional(传播=传播.需要)

        时间:2023-07-26

          <bdo id='r2q8e'></bdo><ul id='r2q8e'></ul>
            • <legend id='r2q8e'><style id='r2q8e'><dir id='r2q8e'><q id='r2q8e'></q></dir></style></legend>
              <i id='r2q8e'><tr id='r2q8e'><dt id='r2q8e'><q id='r2q8e'><span id='r2q8e'><b id='r2q8e'><form id='r2q8e'><ins id='r2q8e'></ins><ul id='r2q8e'></ul><sub id='r2q8e'></sub></form><legend id='r2q8e'></legend><bdo id='r2q8e'><pre id='r2q8e'><center id='r2q8e'></center></pre></bdo></b><th id='r2q8e'></th></span></q></dt></tr></i><div id='r2q8e'><tfoot id='r2q8e'></tfoot><dl id='r2q8e'><fieldset id='r2q8e'></fieldset></dl></div>

                  <small id='r2q8e'></small><noframes id='r2q8e'>

                    <tbody id='r2q8e'></tbody>
                • <tfoot id='r2q8e'></tfoot>

                • 本文介绍了@Transactional(传播=传播.需要)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  如果有人能解释这个注释的作用以及我们何时使用它:

                  if some one can explain what this annotation do and when exactly we use it :

                  @Transactional(propagation=Propagation.REQUIRED)
                  

                  谢谢

                  推荐答案

                  当传播设置为 PROPAGATION_REQUIRED 时,将为应用该设置的每个方法创建一个逻辑事务范围.每个这样的逻辑事务范围可以单独确定仅回滚状态,外部事务范围在逻辑上独立于内部事务范围.当然,在标准 PROPAGATION_REQUIRED 行为的情况下,所有这些范围都将映射到同一个物理事务.因此,在内部事务范围内设置的仅回滚标记确实会影响外部事务实际提交的机会(正如您所期望的那样).

                  When the propagation setting is PROPAGATION_REQUIRED, a logical transaction scope is created for each method upon which the setting is applied. Each such logical transaction scope can determine rollback-only status individually, with an outer transaction scope being logically independent from the inner transaction scope. Of course, in case of standard PROPAGATION_REQUIRED behavior, all these scopes will be mapped to the same physical transaction. So a rollback-only marker set in the inner transaction scope does affect the outer transaction's chance to actually commit (as you would expect it to).

                  http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/transaction.html

                  这篇关于@Transactional(传播=传播.需要)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:@Nullable 注解用法 下一篇:有人可以在休眠中向我解释@MapsId吗?

                  相关文章

                  最新文章

                • <tfoot id='5U2rA'></tfoot><legend id='5U2rA'><style id='5U2rA'><dir id='5U2rA'><q id='5U2rA'></q></dir></style></legend>

                    <bdo id='5U2rA'></bdo><ul id='5U2rA'></ul>

                  1. <small id='5U2rA'></small><noframes id='5U2rA'>

                    <i id='5U2rA'><tr id='5U2rA'><dt id='5U2rA'><q id='5U2rA'><span id='5U2rA'><b id='5U2rA'><form id='5U2rA'><ins id='5U2rA'></ins><ul id='5U2rA'></ul><sub id='5U2rA'></sub></form><legend id='5U2rA'></legend><bdo id='5U2rA'><pre id='5U2rA'><center id='5U2rA'></center></pre></bdo></b><th id='5U2rA'></th></span></q></dt></tr></i><div id='5U2rA'><tfoot id='5U2rA'></tfoot><dl id='5U2rA'><fieldset id='5U2rA'></fieldset></dl></div>