Browse Source

Relax configuration class requirement in configurer callback javadoc

Closes gh-35736
pull/35814/head
Juergen Hoeller 1 month ago
parent
commit
b027b73a7a
  1. 15
      spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurer.java
  2. 18
      spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncConfigurer.java
  3. 19
      spring-tx/src/main/java/org/springframework/transaction/annotation/TransactionManagementConfigurer.java

15
spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurer.java vendored

@ -23,14 +23,15 @@ import org.springframework.cache.interceptor.KeyGenerator; @@ -23,14 +23,15 @@ import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.lang.Nullable;
/**
* Interface to be implemented by @{@link org.springframework.context.annotation.Configuration
* Configuration} classes annotated with @{@link EnableCaching} that wish or need to specify
* explicitly how caches are resolved and how keys are generated for annotation-driven
* cache management.
* Interface to be implemented for explicitly specifying how caches are resolved
* and how keys are generated for annotation-driven cache management.
*
* <p>See @{@link EnableCaching} for general examples and context; see
* {@link #cacheManager()}, {@link #cacheResolver()}, {@link #keyGenerator()}, and
* {@link #errorHandler()} for detailed instructions.
* <p>Typically implemented by
* @{@link org.springframework.context.annotation.Configuration Configuration}
* classes annotated with @{@link EnableCaching}.
* See @{@link EnableCaching} for general examples and context; see
* {@link #cacheManager()}, {@link #cacheResolver()}, {@link #keyGenerator()},
* and {@link #errorHandler()} for detailed instructions.
*
* <p><b>NOTE: A {@code CachingConfigurer} will get initialized early.</b>
* Do not inject common dependencies into autowired fields directly; instead, consider

18
spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncConfigurer.java

@ -22,13 +22,19 @@ import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; @@ -22,13 +22,19 @@ import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.lang.Nullable;
/**
* Interface to be implemented by @{@link org.springframework.context.annotation.Configuration
* Configuration} classes annotated with @{@link EnableAsync} that wish to customize the
* {@link Executor} instance used when processing async method invocations or the
* {@link AsyncUncaughtExceptionHandler} instance used to process exception thrown from
* async method with {@code void} return type.
* Interface to be implemented for customizing the {@link Executor} instance used when
* processing async method invocations or the {@link AsyncUncaughtExceptionHandler}
* instance used to process exceptions thrown from async methods with a {@code void}
* return type.
*
* <p>See @{@link EnableAsync} for usage examples.
* <p>Typically implemented by
* @{@link org.springframework.context.annotation.Configuration Configuration}
* classes annotated with @{@link EnableAsync}.
* See the @{@link EnableAsync} javadoc for usage examples.
*
* <p><b>NOTE: An {@code AsyncConfigurer} will get initialized early.</b>
* Do not inject common dependencies into autowired fields directly; instead, consider
* declaring a lazy {@link org.springframework.beans.factory.ObjectProvider} for those.
*
* @author Chris Beams
* @author Stephane Nicoll

19
spring-tx/src/main/java/org/springframework/transaction/annotation/TransactionManagementConfigurer.java

@ -19,15 +19,18 @@ package org.springframework.transaction.annotation; @@ -19,15 +19,18 @@ package org.springframework.transaction.annotation;
import org.springframework.transaction.TransactionManager;
/**
* Interface to be implemented by @{@link org.springframework.context.annotation.Configuration
* Configuration} classes annotated with @{@link EnableTransactionManagement} that wish to
* (or need to) explicitly specify the default {@code PlatformTransactionManager} bean
* (or {@code ReactiveTransactionManager} bean) to be used 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 {@code PlatformTransactionManager}
* beans (or two {@code ReactiveTransactionManager} beans) present in the container.
* Interface to be implemented for explicitly specifying the default
* {@link org.springframework.transaction.PlatformTransactionManager} bean
* (or {@link org.springframework.transaction.ReactiveTransactionManager} bean)
* to be used 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 {@code PlatformTransactionManager} beans (or two
* {@code ReactiveTransactionManager} beans) present in the container.
*
* <p>See @{@link EnableTransactionManagement} for general examples and context;
* <p>Typically implemented by
* @{@link org.springframework.context.annotation.Configuration Configuration}
* classes annotated with @{@link EnableTransactionManagement}.
* See @{@link EnableTransactionManagement} for general examples and context;
* see {@link #annotationDrivenTransactionManager()} for detailed instructions.
*
* <p><b>NOTE: A {@code TransactionManagementConfigurer} will get initialized early.</b>

Loading…
Cancel
Save