File tree 1 file changed +13
-3
lines changed
spring-context/src/main/java/org/springframework/context/annotation
1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2016 the original author or authors.
2
+ * Copyright 2002-2018 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
77
77
* // ...
78
78
* }</pre>
79
79
*
80
- * <p>Note that {@code @Aspect} beans may be component-scanned like any other. Simply
81
- * mark the aspect with both {@code @Aspect} and {@code @Component}:
80
+ * <p>Note that {@code @Aspect} beans may be component-scanned like any other.
81
+ * Simply mark the aspect with both {@code @Aspect} and {@code @Component}:
82
82
*
83
83
* <pre class="code">
84
84
* package com.foo;
101
101
* // no explicit @Bean definitions required
102
102
* }</pre>
103
103
*
104
+ * <b>Note: {@code @EnableAspectJAutoProxy} applies to its local application context only,
105
+ * allowing for selective proxying of beans at different levels.</b> Please redeclare
106
+ * {@code @EnableAspectJAutoProxy} in each individual context, e.g. the common root web
107
+ * application context and any separate {@code DispatcherServlet} application contexts,
108
+ * if you need to apply its behavior at multiple levels.
109
+ *
110
+ * <p>This feature requires the presence of {@code aspectjweaver} on the classpath.
111
+ * While that dependency is optional for {@code spring-aop} in general, it is required
112
+ * for {@code @EnableAspectJAutoProxy} and its underlying facilities.
113
+ *
104
114
* @author Chris Beams
105
115
* @author Juergen Hoeller
106
116
* @since 3.1
You can’t perform that action at this time.
0 commit comments