|
1 | 1 | [[aop-api]] |
2 | 2 | = Spring AOP APIs |
3 | 3 |
|
4 | | -The previous chapter described the Spring's support for AOP with |
5 | | -@AspectJ and schema-based aspect definitions. In this chapter, we discuss the lower-level |
6 | | -Spring AOP APIs and the AOP support typically used in Spring 1.2 applications. For new |
7 | | -applications, we recommend the use of the Spring 2.0 and later AOP support described in |
8 | | -the previous chapter. However, when you work with existing applications (or when you read books |
9 | | -and articles), you may come across Spring 1.2-style examples. Spring 5 remains backwards |
10 | | -compatible with Spring 1.2, and everything described in this chapter is fully supported |
11 | | -in Spring 5. |
| 4 | +The previous chapter described the Spring's support for AOP with @AspectJ and schema-based |
| 5 | +aspect definitions. In this chapter, we discuss the lower-level Spring AOP APIs. For common |
| 6 | +applications, we recommend the use of Spring AOP with AspectJ pointcuts as described in the |
| 7 | +previous chapter. |
12 | 8 |
|
13 | 9 |
|
14 | 10 |
|
@@ -117,7 +113,7 @@ Since 2.0, the most important type of pointcut used by Spring is |
117 | 113 | `org.springframework.aop.aspectj.AspectJExpressionPointcut`. This is a pointcut that |
118 | 114 | uses an AspectJ-supplied library to parse an AspectJ pointcut expression string. |
119 | 115 |
|
120 | | -See the <<aop,previous chapter>> for a discussion of supported AspectJ pointcut primitives. |
| 116 | +See the <<aop, previous chapter>> for a discussion of supported AspectJ pointcut primitives. |
121 | 117 |
|
122 | 118 |
|
123 | 119 |
|
@@ -253,8 +249,7 @@ following example shows how to subclass `StaticMethodMatcherPointcut`: |
253 | 249 | ==== |
254 | 250 |
|
255 | 251 | There are also superclasses for dynamic pointcuts. |
256 | | - |
257 | | -You can use custom pointcuts with any advice type in Spring 1.0 RC2 and above. |
| 252 | +You can use custom pointcuts with any advice type. |
258 | 253 |
|
259 | 254 |
|
260 | 255 |
|
@@ -1046,8 +1041,7 @@ to consider: |
1046 | 1041 | and included in the spring-core JAR. In other words, CGLIB-based AOP works "`out of |
1047 | 1042 | the box`", as do JDK dynamic proxies. |
1048 | 1043 |
|
1049 | | -There is little performance difference between CGLIB proxying and dynamic proxies. As of |
1050 | | -Spring 1.0, dynamic proxies are slightly faster. However, this may change in the future. |
| 1044 | +There is little performance difference between CGLIB proxying and dynamic proxies. |
1051 | 1045 | Performance should not be a decisive consideration in this case. |
1052 | 1046 |
|
1053 | 1047 |
|
@@ -1150,7 +1144,7 @@ we override the transaction propagation settings: |
1150 | 1144 |
|
1151 | 1145 | Note that in the parent bean example, we explicitly marked the parent bean definition as |
1152 | 1146 | being abstract by setting the `abstract` attribute to `true`, as described |
1153 | | -<<beans-child-bean-definitions,previously>>, so that it may not actually ever be |
| 1147 | +<<beans-child-bean-definitions, previously>>, so that it may not actually ever be |
1154 | 1148 | instantiated. Application contexts (but not simple bean factories), by default, |
1155 | 1149 | pre-instantiate all singletons. Therefore, it is important (at least for singleton beans) |
1156 | 1150 | that, if you have a (parent) bean definition that you intend to use only as a template, |
@@ -1290,9 +1284,7 @@ Depending on how you created the proxy, you can usually set a `frozen` flag. In |
1290 | 1284 | case, the `Advised` `isFrozen()` method returns `true`, and any attempts to modify |
1291 | 1285 | advice through addition or removal results in an `AopConfigException`. The ability |
1292 | 1286 | to freeze the state of an advised object is useful in some cases (for example, to |
1293 | | -prevent calling code removing a security interceptor). It may also be used in Spring 1.1 |
1294 | | -to allow aggressive optimization if runtime advice modification is known not to be |
1295 | | -required. |
| 1287 | +prevent calling code removing a security interceptor). |
1296 | 1288 |
|
1297 | 1289 |
|
1298 | 1290 |
|
|
0 commit comments