@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,18 +35,20 @@ import org.springframework.transaction.config.TransactionManagementConfigUtils;
|
||||
public class TransactionManagementConfigurationSelector extends AdviceModeImportSelector<EnableTransactionManagement> {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @return {@link ProxyTransactionManagementConfiguration} or
|
||||
* {@code AspectJTransactionManagementConfiguration} for {@code PROXY} and
|
||||
* {@code ASPECTJ} values of {@link EnableTransactionManagement#mode()}, respectively
|
||||
* Returns {@link ProxyTransactionManagementConfiguration} or
|
||||
* {@code AspectJTransactionManagementConfiguration} for {@code PROXY}
|
||||
* and {@code ASPECTJ} values of {@link EnableTransactionManagement#mode()},
|
||||
* respectively.
|
||||
*/
|
||||
@Override
|
||||
protected String[] selectImports(AdviceMode adviceMode) {
|
||||
switch (adviceMode) {
|
||||
case PROXY:
|
||||
return new String[] {AutoProxyRegistrar.class.getName(), ProxyTransactionManagementConfiguration.class.getName()};
|
||||
return new String[] {AutoProxyRegistrar.class.getName(),
|
||||
ProxyTransactionManagementConfiguration.class.getName()};
|
||||
case ASPECTJ:
|
||||
return new String[] {TransactionManagementConfigUtils.TRANSACTION_ASPECT_CONFIGURATION_CLASS_NAME};
|
||||
return new String[] {
|
||||
TransactionManagementConfigUtils.TRANSACTION_ASPECT_CONFIGURATION_CLASS_NAME};
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user