parent
1dde30a7fd
commit
c03162e616
|
@ -316,17 +316,17 @@ other class. They can also contain pointcut, advice, and introduction (inter-typ
|
||||||
declarations.
|
declarations.
|
||||||
|
|
||||||
.Autodetecting aspects through component scanning
|
.Autodetecting aspects through component scanning
|
||||||
NOTE: You can register aspect classes as regular beans in your Spring XML configuration, using `@Bean` factory method or
|
NOTE: You can register aspect classes as regular beans in your Spring XML configuration,
|
||||||
autodetect them through classpath scanning -- the same as any other Spring-managed bean.
|
via `@Bean` methods in `@Configuration` classes, or have Spring autodetect them through
|
||||||
However, note that the `@Aspect` annotation is not sufficient for autodetection in
|
classpath scanning -- the same as any other Spring-managed bean. However, note that the
|
||||||
the classpath. For that purpose, you need to add a separate `@Component` annotation
|
`@Aspect` annotation is not sufficient for autodetection in the classpath. For that
|
||||||
(or, alternatively, a custom stereotype annotation that qualifies, as per the rules of
|
purpose, you need to add a separate `@Component` annotation (or, alternatively, a custom
|
||||||
Spring's component scanner).
|
stereotype annotation that qualifies, as per the rules of Spring's component scanner).
|
||||||
|
|
||||||
.Advising aspects with other aspects?
|
.Advising aspects with other aspects?
|
||||||
NOTE: In Spring AOP, aspects themselves cannot be the targets of advice
|
NOTE: In Spring AOP, aspects themselves cannot be the targets of advice from other
|
||||||
from other aspects. The `@Aspect` annotation on a class marks it as an aspect and,
|
aspects. The `@Aspect` annotation on a class marks it as an aspect and, hence, excludes
|
||||||
hence, excludes it from auto-proxying.
|
it from auto-proxying.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -361,7 +361,7 @@ matches the execution of any method named `transfer`:
|
||||||
----
|
----
|
||||||
|
|
||||||
The pointcut expression that forms the value of the `@Pointcut` annotation is a regular
|
The pointcut expression that forms the value of the `@Pointcut` annotation is a regular
|
||||||
AspectJ 5 pointcut expression. For a full discussion of AspectJ's pointcut language, see
|
AspectJ pointcut expression. For a full discussion of AspectJ's pointcut language, see
|
||||||
the https://www.eclipse.org/aspectj/doc/released/progguide/index.html[AspectJ
|
the https://www.eclipse.org/aspectj/doc/released/progguide/index.html[AspectJ
|
||||||
Programming Guide] (and, for extensions, the
|
Programming Guide] (and, for extensions, the
|
||||||
https://www.eclipse.org/aspectj/doc/released/adk15notebook/index.html[AspectJ 5
|
https://www.eclipse.org/aspectj/doc/released/adk15notebook/index.html[AspectJ 5
|
||||||
|
|
Loading…
Reference in New Issue