@Target(value=TYPE) @Retention(value=RUNTIME) @Documented @Import(value=TransactionManagementConfigurationSelector.class) public @interface EnableTransactionManagement
<tx:*>
XML namespace. To be used onTransactionManagementConfigurer
,
TransactionManagementConfigurationSelector
,
ProxyTransactionManagementConfiguration
,
AspectJTransactionManagementConfiguration
Modifier and Type | Optional Element and Description |
---|---|
AdviceMode |
mode
Indicate how transactional advice should be applied.
|
int |
order
Indicate the ordering of the execution of the transaction advisor
when multiple advices are applied at a specific joinpoint.
|
boolean |
proxyTargetClass
Indicate whether subclass-based (CGLIB) proxies are to be created (
true ) as
opposed to standard Java interface-based proxies (false ). |
public abstract boolean proxyTargetClass
true
) as
opposed to standard Java interface-based proxies (false
). The default is
false
. Applicable only if mode()
is set to
AdviceMode.PROXY
.
Note that setting this attribute to true
will affect all
Spring-managed beans requiring proxying, not just those marked with
@Transactional
. For example, other beans marked with Spring's
@Async
annotation will be upgraded to subclass proxying at the same
time. This approach has no negative impact in practice unless one is explicitly
expecting one type of proxy vs another, e.g. in tests.
public abstract AdviceMode mode
AdviceMode.PROXY
.AdviceMode
public abstract int order
Ordered.LOWEST_PRECEDENCE
.