Polish @Enable* Javadoc

This commit is contained in:
Chris Beams 2011-11-16 04:20:17 +00:00
parent 40798bd48f
commit 43b3b4c261
4 changed files with 17 additions and 15 deletions

View File

@ -132,8 +132,9 @@ public @interface EnableAsync {
boolean proxyTargetClass() default false; boolean proxyTargetClass() default false;
/** /**
* Indicate how async advice should be applied. * Indicate how async advice should be applied. The default is
* The default is {@link AdviceMode#PROXY}. * {@link AdviceMode#PROXY}.
* @see AdviceMode
*/ */
AdviceMode mode() default AdviceMode.PROXY; AdviceMode mode() default AdviceMode.PROXY;

View File

@ -41,8 +41,8 @@ public abstract class AbstractTransactionManagementConfiguration implements Impo
protected PlatformTransactionManager txManager; protected PlatformTransactionManager txManager;
public void setImportMetadata(AnnotationMetadata importMetadata) { public void setImportMetadata(AnnotationMetadata importMetadata) {
enableTx = importMetadata.getAnnotationAttributes(EnableTransactionManagement.class.getName(), false); this.enableTx = importMetadata.getAnnotationAttributes(EnableTransactionManagement.class.getName(), false);
Assert.notNull(enableTx, Assert.notNull(this.enableTx,
"@EnableTransactionManagement is not present on importing class " + "@EnableTransactionManagement is not present on importing class " +
importMetadata.getClassName()); importMetadata.getClassName());
} }

View File

@ -71,7 +71,7 @@ import org.springframework.core.Ordered;
* <tx:annotation-driven/>} are responsible for registering the necessary Spring * <tx:annotation-driven/>} are responsible for registering the necessary Spring
* components that power annotation-driven transaction management, such as the * components that power annotation-driven transaction management, such as the
* TransactionInterceptor and the proxy- or AspectJ-based advice that weave the * TransactionInterceptor and the proxy- or AspectJ-based advice that weave the
* interceptor into the call stack when {@code JdbcFooRepository}'s {@code @Transacational} * interceptor into the call stack when {@code JdbcFooRepository}'s {@code @Transactional}
* methods are invoked. * methods are invoked.
* *
* <p>A minor difference between the two examples lies in the naming of the {@code * <p>A minor difference between the two examples lies in the naming of the {@code
@ -123,9 +123,9 @@ import org.springframework.core.Ordered;
* {@link AdviceMode#PROXY} (the default), then the other attributes control the behavior * {@link AdviceMode#PROXY} (the default), then the other attributes control the behavior
* of the proxying. * of the proxying.
* *
* <p>Note that if the {@linkplain #mode} is set to {@link AdviceMode#ASPECTJ}, then * <p>If the {@linkplain #mode} is set to {@link AdviceMode#ASPECTJ}, then the
* the {@link #proxyTargetClass()} attribute is obsolete. Note also that in this case the * {@link #proxyTargetClass()} attribute is obsolete. Note also that in this case the
* {@code spring-aspects} module JAR must be present on the classpath.<p> * {@code spring-aspects} module JAR must be present on the classpath.
* *
* @author Chris Beams * @author Chris Beams
* @since 3.1 * @since 3.1
@ -141,9 +141,10 @@ import org.springframework.core.Ordered;
public @interface EnableTransactionManagement { public @interface EnableTransactionManagement {
/** /**
* Indicate whether subclass-based (CGLIB) proxies are to be created as opposed * Indicate whether subclass-based (CGLIB) proxies are to be created ({@code true}) as
* to standard Java interface-based proxies. The default is {@code false}. <strong> * opposed to standard Java interface-based proxies ({@code false}). The default is
* Applicable only if {@link #mode()} is set to {@link AdviceMode#PROXY}</strong>. * {@code false}. <strong>Applicable only if {@link #mode()} is set to
* {@link AdviceMode#PROXY}</strong>.
* *
* <p>Note that subclass-based proxies require the {@link Transactional @Transactional} * <p>Note that subclass-based proxies require the {@link Transactional @Transactional}
* to be defined on the concrete class. Annotations in interfaces will * to be defined on the concrete class. Annotations in interfaces will
@ -152,8 +153,8 @@ public @interface EnableTransactionManagement {
boolean proxyTargetClass() default false; boolean proxyTargetClass() default false;
/** /**
* Indicate how transactional advice should be applied. * Indicate how transactional advice should be applied. The default is
* The default is {@link AdviceMode.PROXY}. * {@link AdviceMode.PROXY}.
* @see AdviceMode * @see AdviceMode
*/ */
AdviceMode mode() default AdviceMode.PROXY; AdviceMode mode() default AdviceMode.PROXY;

View File

@ -24,10 +24,10 @@ import org.springframework.transaction.PlatformTransactionManager;
* or need to specify explicitly the {@link PlatformTransactionManager} bean to be used * or need to specify explicitly the {@link PlatformTransactionManager} bean to be used
* for annotation-driven transaction management, as opposed to the default approach of a * for annotation-driven transaction management, as opposed to the default approach of a
* by-type lookup. One reason this might be necessary is if there are two * by-type lookup. One reason this might be necessary is if there are two
* {@code PlatformTransactionManager} implementations present in the container. * {@code PlatformTransactionManager} beans present in the container.
* *
* <p>See @{@link EnableTransactionManagement} for general examples and context; see * <p>See @{@link EnableTransactionManagement} for general examples and context; see
* {@link #annotationDrivenTransactionManager()} below for detailed instructions. * {@link #annotationDrivenTransactionManager()} for detailed instructions.
* *
* <p>Note that in by-type lookup disambiguation cases, an alternative approach to * <p>Note that in by-type lookup disambiguation cases, an alternative approach to
* implementing this interface is to simply mark one of the offending {@code * implementing this interface is to simply mark one of the offending {@code