Skip to content

Commit b027b73

Browse files
committed
Relax configuration class requirement in configurer callback javadoc
Closes gh-35736
1 parent c0429db commit b027b73

File tree

3 files changed

+31
-21
lines changed

3 files changed

+31
-21
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@
2323
import org.springframework.lang.Nullable;
2424

2525
/**
26-
* Interface to be implemented by @{@link org.springframework.context.annotation.Configuration
27-
* Configuration} classes annotated with @{@link EnableCaching} that wish or need to specify
28-
* explicitly how caches are resolved and how keys are generated for annotation-driven
29-
* cache management.
26+
* Interface to be implemented for explicitly specifying how caches are resolved
27+
* and how keys are generated for annotation-driven cache management.
3028
*
31-
* <p>See @{@link EnableCaching} for general examples and context; see
32-
* {@link #cacheManager()}, {@link #cacheResolver()}, {@link #keyGenerator()}, and
33-
* {@link #errorHandler()} for detailed instructions.
29+
* <p>Typically implemented by
30+
* @{@link org.springframework.context.annotation.Configuration Configuration}
31+
* classes annotated with @{@link EnableCaching}.
32+
* See @{@link EnableCaching} for general examples and context; see
33+
* {@link #cacheManager()}, {@link #cacheResolver()}, {@link #keyGenerator()},
34+
* and {@link #errorHandler()} for detailed instructions.
3435
*
3536
* <p><b>NOTE: A {@code CachingConfigurer} will get initialized early.</b>
3637
* Do not inject common dependencies into autowired fields directly; instead, consider

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,19 @@
2222
import org.springframework.lang.Nullable;
2323

2424
/**
25-
* Interface to be implemented by @{@link org.springframework.context.annotation.Configuration
26-
* Configuration} classes annotated with @{@link EnableAsync} that wish to customize the
27-
* {@link Executor} instance used when processing async method invocations or the
28-
* {@link AsyncUncaughtExceptionHandler} instance used to process exception thrown from
29-
* async method with {@code void} return type.
25+
* Interface to be implemented for customizing the {@link Executor} instance used when
26+
* processing async method invocations or the {@link AsyncUncaughtExceptionHandler}
27+
* instance used to process exceptions thrown from async methods with a {@code void}
28+
* return type.
3029
*
31-
* <p>See @{@link EnableAsync} for usage examples.
30+
* <p>Typically implemented by
31+
* @{@link org.springframework.context.annotation.Configuration Configuration}
32+
* classes annotated with @{@link EnableAsync}.
33+
* See the @{@link EnableAsync} javadoc for usage examples.
34+
*
35+
* <p><b>NOTE: An {@code AsyncConfigurer} will get initialized early.</b>
36+
* Do not inject common dependencies into autowired fields directly; instead, consider
37+
* declaring a lazy {@link org.springframework.beans.factory.ObjectProvider} for those.
3238
*
3339
* @author Chris Beams
3440
* @author Stephane Nicoll

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

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@
1919
import org.springframework.transaction.TransactionManager;
2020

2121
/**
22-
* Interface to be implemented by @{@link org.springframework.context.annotation.Configuration
23-
* Configuration} classes annotated with @{@link EnableTransactionManagement} that wish to
24-
* (or need to) explicitly specify the default {@code PlatformTransactionManager} bean
25-
* (or {@code ReactiveTransactionManager} bean) to be used for annotation-driven
26-
* transaction management, as opposed to the default approach of a by-type lookup.
27-
* One reason this might be necessary is if there are two {@code PlatformTransactionManager}
28-
* beans (or two {@code ReactiveTransactionManager} beans) present in the container.
22+
* Interface to be implemented for explicitly specifying the default
23+
* {@link org.springframework.transaction.PlatformTransactionManager} bean
24+
* (or {@link org.springframework.transaction.ReactiveTransactionManager} bean)
25+
* to be used for annotation-driven transaction management, as opposed to the
26+
* default approach of a by-type lookup. One reason this might be necessary is
27+
* if there are two {@code PlatformTransactionManager} beans (or two
28+
* {@code ReactiveTransactionManager} beans) present in the container.
2929
*
30-
* <p>See @{@link EnableTransactionManagement} for general examples and context;
30+
* <p>Typically implemented by
31+
* @{@link org.springframework.context.annotation.Configuration Configuration}
32+
* classes annotated with @{@link EnableTransactionManagement}.
33+
* See @{@link EnableTransactionManagement} for general examples and context;
3134
* see {@link #annotationDrivenTransactionManager()} for detailed instructions.
3235
*
3336
* <p><b>NOTE: A {@code TransactionManagementConfigurer} will get initialized early.</b>

0 commit comments

Comments
 (0)