提交 47e1724d 编写于 作者: S Sam Brannen

Deprecate TxConfigAttributes alongside @TxConfig

Since @TransactionConfiguration is now deprecated, this commit also
deprecates TransactionConfigurationAttributes with the intention of
completely removing TransactionConfigurationAttributes once
@TransactionConfiguration has been removed.

Issue: SPR-13277
上级 d6bdfcaa
......@@ -27,7 +27,10 @@ import org.springframework.util.Assert;
* @author Juergen Hoeller
* @since 2.5
* @see TransactionConfiguration
* @deprecated As of Spring Framework 4.2, this class is officially deprecated
* and will be removed when {@code @TransactionConfiguration} is removed.
*/
@Deprecated
public class TransactionConfigurationAttributes {
private final String transactionManagerName;
......
......@@ -130,10 +130,12 @@ public class TransactionalTestExecutionListener extends AbstractTestExecutionLis
private static final Log logger = LogFactory.getLog(TransactionalTestExecutionListener.class);
@SuppressWarnings("deprecation")
private static final TransactionConfigurationAttributes defaultTxConfigAttributes = new TransactionConfigurationAttributes();
protected final TransactionAttributeSource attributeSource = new AnnotationTransactionAttributeSource();
@SuppressWarnings("deprecation")
private TransactionConfigurationAttributes configurationAttributes;
......@@ -343,6 +345,7 @@ public class TransactionalTestExecutionListener extends AbstractTestExecutionLis
* @see #getTransactionManager(TestContext, String)
*/
protected PlatformTransactionManager getTransactionManager(TestContext testContext) {
@SuppressWarnings("deprecation")
String tmName = retrieveConfigurationAttributes(testContext).getTransactionManagerName();
return TestContextTransactionUtils.retrieveTransactionManager(testContext, tmName);
}
......@@ -358,6 +361,7 @@ public class TransactionalTestExecutionListener extends AbstractTestExecutionLis
* @return the <em>default rollback</em> flag for the supplied test context
* @throws Exception if an error occurs while determining the default rollback flag
*/
@SuppressWarnings("deprecation")
protected final boolean isDefaultRollback(TestContext testContext) throws Exception {
Class<?> testClass = testContext.getTestClass();
Rollback rollback = findAnnotation(testClass, Rollback.class);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册