@@ -83,9 +83,9 @@ Spring AOP includes the following types of advice:
8383 an exception).
8484* After returning advice: Advice to be run after a join point completes
8585 normally (for example, if a method returns without throwing an exception).
86- * After throwing advice: Advice to be executed if a method exits by throwing an
86+ * After throwing advice: Advice to be run if a method exits by throwing an
8787 exception.
88- * After (finally) advice: Advice to be executed regardless of the means by which a
88+ * After (finally) advice: Advice to be run regardless of the means by which a
8989 join point exits (normal or exceptional return).
9090* Around advice: Advice that surrounds a join point such as a method invocation.
9191 This is the most powerful kind of advice. Around advice can perform custom behavior
@@ -219,7 +219,7 @@ To use @AspectJ aspects in a Spring configuration, you need to enable Spring sup
219219configuring Spring AOP based on @AspectJ aspects and auto-proxying beans based on
220220whether or not they are advised by those aspects. By auto-proxying, we mean that, if Spring
221221determines that a bean is advised by one or more aspects, it automatically generates
222- a proxy for that bean to intercept method invocations and ensures that advice is executed
222+ a proxy for that bean to intercept method invocations and ensures that advice is run
223223as needed.
224224
225225The @AspectJ support can be enabled with XML- or Java-style configuration. In either
@@ -334,7 +334,7 @@ hence, excludes it from auto-proxying.
334334=== Declaring a Pointcut
335335
336336Pointcuts determine join points of interest and thus enable us to control
337- when advice executes . Spring AOP only supports method execution join points for Spring
337+ when advice runs . Spring AOP only supports method execution join points for Spring
338338beans, so you can think of a pointcut as matching the execution of methods on Spring
339339beans. A pointcut declaration has two parts: a signature comprising a name and any
340340parameters and a pointcut expression that determines exactly which method
@@ -395,7 +395,7 @@ expressions:
395395 annotation (the execution of methods declared in types with the given annotation when
396396 using Spring AOP).
397397* `@annotation`: Limits matching to join points where the subject of the join point
398- (the method being executed in Spring AOP) has the given annotation.
398+ (the method being run in Spring AOP) has the given annotation.
399399
400400.Other pointcut types
401401****
@@ -1211,8 +1211,8 @@ The following example shows how to use after finally advice:
12111211==== Around Advice
12121212
12131213The last kind of advice is around advice. Around advice runs "`around`" a matched method's
1214- execution. It has the opportunity to do work both before and after the method executes
1215- and to determine when, how, and even if the method actually gets to execute at all.
1214+ execution. It has the opportunity to do work both before and after the method runs
1215+ and to determine when, how, and even if the method actually gets to run at all.
12161216Around advice is often used if you need to share state before and after a method
12171217execution in a thread-safe manner (starting and stopping a timer, for example). Always
12181218use the least powerful form of advice that meets your requirements (that is, do not use
@@ -1221,7 +1221,7 @@ around advice if before advice would do).
12211221Around advice is declared by using the `@Around` annotation. The first parameter of the
12221222advice method must be of type `ProceedingJoinPoint`. Within the body of the advice,
12231223calling `proceed()` on the `ProceedingJoinPoint` causes the underlying method to
1224- execute . The `proceed` method can also pass in an `Object[]`. The values
1224+ run . The `proceed` method can also pass in an `Object[]`. The values
12251225in the array are used as the arguments to the method execution when it proceeds.
12261226
12271227NOTE: The behavior of `proceed` when called with an `Object[]` is a little different than the
@@ -1783,15 +1783,15 @@ annotation. Consider the following example:
17831783 }
17841784----
17851785
1786- In the preceding example, the effect of the `' perthis' ` clause is that one aspect
1787- instance is created for each unique service object that executes a business service (each
1788- unique object bound to ' this' at join points matched by the pointcut expression). The
1789- aspect instance is created the first time that a method is invoked on the service object.
1790- The aspect goes out of scope when the service object goes out of scope. Before the aspect
1791- instance is created, none of the advice within it executes . As soon as the aspect
1792- instance has been created, the advice declared within it executes at matched join points,
1793- but only when the service object is the one with which this aspect is associated. See the
1794- AspectJ Programming Guide for more information on `per` clauses.
1786+ In the preceding example, the effect of the `perthis` clause is that one aspect instance
1787+ is created for each unique service object that performs a business service (each unique
1788+ object bound to ` this` at join points matched by the pointcut expression). The aspect
1789+ instance is created the first time that a method is invoked on the service object. The
1790+ aspect goes out of scope when the service object goes out of scope. Before the aspect
1791+ instance is created, none of the advice within it runs . As soon as the aspect instance
1792+ has been created, the advice declared within it runs at matched join points, but only
1793+ when the service object is the one with which this aspect is associated. See the AspectJ
1794+ Programming Guide for more information on `per` clauses.
17951795
17961796The `pertarget` instantiation model works in exactly the same way as `perthis`, but it
17971797creates one aspect instance for each unique target object at matched join points.
@@ -2188,7 +2188,7 @@ significantly improve the readability of your code.
21882188
21892189The `method` attribute identifies a method (`doAccessCheck`) that provides the body of
21902190the advice. This method must be defined for the bean referenced by the aspect element
2191- that contains the advice. Before a data access operation is executed (a method execution
2191+ that contains the advice. Before a data access operation is performed (a method execution
21922192join point matched by the pointcut expression), the `doAccessCheck` method on the aspect
21932193bean is invoked.
21942194
@@ -2250,7 +2250,7 @@ example, you can declare the method signature as follows:
22502250[[aop-schema-advice-after-throwing]]
22512251==== After Throwing Advice
22522252
2253- After throwing advice executes when a matched method execution exits by throwing an
2253+ After throwing advice runs when a matched method execution exits by throwing an
22542254exception. It is declared inside an `<aop:aspect>` by using the `after-throwing` element,
22552255as the following example shows:
22562256
@@ -2325,8 +2325,8 @@ by using the `after` element, as the following example shows:
23252325==== Around Advice
23262326
23272327The last kind of advice is around advice. Around advice runs "around" a matched method
2328- execution. It has the opportunity to do work both before and after the method executes
2329- and to determine when, how, and even if the method actually gets to execute at all.
2328+ execution. It has the opportunity to do work both before and after the method runs
2329+ and to determine when, how, and even if the method actually gets to run at all.
23302330Around advice is often used to share state before and after a method
23312331execution in a thread-safe manner (starting and stopping a timer, for example). Always
23322332use the least powerful form of advice that meets your requirements. Do not use around
@@ -2335,7 +2335,7 @@ advice if before advice can do the job.
23352335You can declare around advice by using the `aop:around` element. The first parameter of the
23362336advice method must be of type `ProceedingJoinPoint`. Within the body of the advice,
23372337calling `proceed()` on the `ProceedingJoinPoint` causes the underlying method to
2338- execute . The `proceed` method may also be called with an `Object[]`. The values
2338+ run . The `proceed` method may also be called with an `Object[]`. The values
23392339in the array are used as the arguments to the method execution when it proceeds. See
23402340<<aop-ataspectj-around-advice>> for notes on calling `proceed` with an `Object[]`.
23412341The following example shows how to declare around advice in XML:
@@ -2563,7 +2563,7 @@ ms % Task name
25632563[[aop-ordering]]
25642564==== Advice Ordering
25652565
2566- When multiple pieces of advice need to execute at the same join point (executing method)
2566+ When multiple pieces of advice need to run at the same join point (executing method)
25672567the ordering rules are as described in <<aop-ataspectj-advice-ordering>>. The precedence
25682568between aspects is determined via the `order` attribute in the `<aop:aspect>` element or
25692569by either adding the `@Order` annotation to the bean that backs the aspect or by having
@@ -2772,7 +2772,7 @@ call `proceed` multiple times. The following listing shows the basic aspect impl
27722772 class ConcurrentOperationExecutor : Ordered {
27732773
27742774 private val DEFAULT_MAX_RETRIES = 2
2775-
2775+
27762776 private var maxRetries = DEFAULT_MAX_RETRIES
27772777 private var order = 1
27782778
@@ -2787,7 +2787,7 @@ call `proceed` multiple times. The following listing shows the basic aspect impl
27872787 fun setOrder(order: Int) {
27882788 this.order = order
27892789 }
2790-
2790+
27912791 fun doConcurrentOperation(pjp: ProceedingJoinPoint): Any {
27922792 var numAttempts = 0
27932793 var lockFailureException: PessimisticLockingFailureException
@@ -3160,13 +3160,13 @@ The key thing to understand here is that the client code inside the `main(..)` m
31603160of the `Main` class has a reference to the proxy. This means that method calls on that
31613161object reference are calls on the proxy. As a result, the proxy can delegate to all of
31623162the interceptors (advice) that are relevant to that particular method call. However,
3163- once the call has finally reached the target object (the `SimplePojo`, reference in
3163+ once the call has finally reached the target object (the `SimplePojo` reference in
31643164this case), any method calls that it may make on itself, such as `this.bar()` or
31653165`this.foo()`, are going to be invoked against the `this` reference, and not the proxy.
31663166This has important implications. It means that self-invocation is not going to result
3167- in the advice associated with a method invocation getting a chance to execute .
3167+ in the advice associated with a method invocation getting a chance to run .
31683168
3169- Okay, so what is to be done about this? The best approach (the term, "` best,` " is used
3169+ Okay, so what is to be done about this? The best approach (the term " best" is used
31703170loosely here) is to refactor your code such that the self-invocation does not happen.
31713171This does entail some work on your part, but it is the best, least-invasive approach.
31723172The next approach is absolutely horrendous, and we hesitate to point it out, precisely
@@ -3433,7 +3433,7 @@ exact semantics of "`after returning from the initialization of a new object`" a
34333433fine. In this context, "`after initialization`" means that the dependencies are
34343434injected after the object has been constructed. This means that the dependencies
34353435are not available for use in the constructor bodies of the class. If you want the
3436- dependencies to be injected before the constructor bodies execute and thus be
3436+ dependencies to be injected before the constructor bodies run and thus be
34373437available for use in the body of the constructors, you need to define this on the
34383438`@Configurable` declaration, as follows:
34393439
0 commit comments