added explicit section on autodetecting aspects through component scanning (SPR-7246)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3413 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
b2f90a6be9
commit
53ac18362a
|
|
@ -391,7 +391,20 @@ public class NotVeryUsefulAspect {
|
|||
introduction (inter-type) declarations.</para>
|
||||
|
||||
<note>
|
||||
<title>Advising aspects</title>
|
||||
<title>Autodetecting aspects through component scanning</title>
|
||||
|
||||
<para>You may register aspect classes as regular beans in your Spring
|
||||
XML configuration, or autodetect them throuch classpath scanning -
|
||||
just like any other Spring-managed bean. However, note that the
|
||||
<emphasis>@Aspect</emphasis> annotation is <emphasis>not</emphasis>
|
||||
sufficient for autodetection in the classpath: For that purpose,
|
||||
you need to add a separate <emphasis>@Component</emphasis> annotation
|
||||
(or alternatively a custom stereotype annotation that qualifies,
|
||||
as per the rules of Spring's component scanner).</para>
|
||||
</note>
|
||||
|
||||
<note>
|
||||
<title>Advising aspects with other aspects?</title>
|
||||
|
||||
<para>In Spring AOP, it is <emphasis>not</emphasis> possible to have
|
||||
aspects themselves be the target of advice from other aspects. The
|
||||
|
|
|
|||
Loading…
Reference in New Issue