Introduce alias for 'value' attribute in @Transactional

Issue: SPR-11393
This commit is contained in:
Sam Brannen
2015-06-12 22:31:41 +02:00
parent 6fc388315e
commit 6b7c1d72e8
4 changed files with 49 additions and 36 deletions

View File

@@ -23,6 +23,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;
import org.springframework.transaction.TransactionDefinition;
/**
@@ -55,14 +56,24 @@ import org.springframework.transaction.TransactionDefinition;
@Documented
public @interface Transactional {
/**
* Alias for {@link #transactionManager}.
* @see #transactionManager
*/
@AliasFor(attribute = "transactionManager")
String value() default "";
/**
* A <em>qualifier</em> value for the specified transaction.
* <p>May be used to determine the target transaction manager,
* matching the qualifier value (or the bean name) of a specific
* {@link org.springframework.transaction.PlatformTransactionManager}
* bean definition.
* @since 4.2
* @see #value
*/
String value() default "";
@AliasFor(attribute = "value")
String transactionManager() default "";
/**
* The transaction propagation type.