File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
spring-framework-reference/src Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -391,7 +391,20 @@ public class NotVeryUsefulAspect {
391
391
introduction (inter-type) declarations.</para >
392
392
393
393
<note >
394
- <title >Advising aspects</title >
394
+ <title >Autodetecting aspects through component scanning</title >
395
+
396
+ <para >You may register aspect classes as regular beans in your Spring
397
+ XML configuration, or autodetect them throuch classpath scanning -
398
+ just like any other Spring-managed bean. However, note that the
399
+ <emphasis >@Aspect</emphasis > annotation is <emphasis >not</emphasis >
400
+ sufficient for autodetection in the classpath: For that purpose,
401
+ you need to add a separate <emphasis >@Component</emphasis > annotation
402
+ (or alternatively a custom stereotype annotation that qualifies,
403
+ as per the rules of Spring's component scanner).</para >
404
+ </note >
405
+
406
+ <note >
407
+ <title >Advising aspects with other aspects?</title >
395
408
396
409
<para >In Spring AOP, it is <emphasis >not</emphasis > possible to have
397
410
aspects themselves be the target of advice from other aspects. The
You can’t perform that action at this time.
0 commit comments