@AspectJ support (good)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了@AspectJ support (good)相关的知识,希望对你有一定的参考价值。
AspectJ类型匹配的通配符:
*:匹配任何数量字符;
..:匹配任何数量字符的重复,如在类型模式中匹配任何数量子包;而在方法参数模式中匹配任何数量参数。
+:匹配指定类型的子类型;仅能作为后缀放在类型模式后边。
java.lang.String 匹配String类型;
java.*.String 匹配java包下的任何“一级子包”下的String类型;//*只能匹配一个子包
如匹配java.lang.String,但不匹配java.lang.ss.String
java..* 匹配java包及任何子包下的任何类型;
如匹配java.lang.String、java.lang.annotation.Annotation
java.lang.*ing 匹配任何java.lang包下的以ing结尾的类型;
java.lang.Number+ 匹配java.lang包下的任何Number的子类型;
如匹配java.lang.Integer,也匹配java.math.BigInteger
eg:
任意公共方法的执行:
execution(public * *(..))
任何一个以“set”开始的方法的执行:
execution(* set*(..))
AccountService 接口的任意方法的执行:
execution(* com.xyz.service.AccountService.*(..))
定义在service包里的任意方法的执行:
execution(* com.xyz.service.*.*(..))
定义在service包和所有子包里的任意类的任意方法的执行:
execution(* com.xyz.service..*.*(..))
定义在pointcutexp包和所有子包里的JoinPointObjP2类的任意方法的执行:
execution(* com.test.spring.aop.pointcutexp..JoinPointObjP2.*(..))")
***>
最靠近方法名(..)的为方法名, //括号左边是方法名
最靠近类名.*(..))的为类名或者接口名,如上例的JoinPointObjP2.*(..)) //点号左边是类名
pointcutexp包里的任意类.
within(com.test.spring.aop.pointcutexp.*)
pointcutexp包和所有子包里的任意类.
within(com.test.spring.aop.pointcutexp..*)
实现了Intf接口的所有类,如果Intf不是接口,限定Intf单个类.
this(com.test.spring.aop.pointcutexp.Intf)
***> 当一个实现了接口的类被AOP的时候,用getBean方法必须cast为接口类型,不能为该类的类型.
带有@Transactional标注的所有类的任意方法.
@within(org.springframework.transaction.annotation.Transactional)
@target(org.springframework.transaction.annotation.Transactional)
带有@Transactional标注的任意方法.
@annotation(org.springframework.transaction.annotation.Transactional)
***> @within和@target针对类的注解,@annotation是针对方法的注解
参数带有@Transactional标注的方法.
@args(org.springframework.transaction.annotation.Transactional)
参数为String类型(运行是决定)的方法.
http://www.mekau.com/4880.html https://github.com/doc-spring/AspectJ
http://si加shuo加k.com/forum/posts/list/281.html
注解? 修饰符? 返回值类型 类型声明?方法名(参数列表) 异常列表?
注解:可选,方法上持有的注解,如@Deprecated;
修饰符:可选,如public、protected;
返回值类型:必填,可以是任何类型模式;“*”表示所有类型;
类型声明:可选,可以是任何类型模式;
方法名:必填,可以使用“*”进行模式匹配;
参数列表:“()”表示方法没有任何参数;“(..)”表示匹配接受任意个参数的方法,“(..,java.lang.String)”表示匹配接受java.lang.String类型的参数结束,且其前边可以接受有任意个参数的方法;“(java.lang.String,..)” 表示匹配接受java.lang.String类型的参数开始,且其后边可以接受任意个参数的方法;“(*,java.lang.String)” 表示匹配接受java.lang.String类型的参数结束,且其前边接受有一个任意类型参数的方法;
异常列表:可选,以“throws 异常全限定名列表”声明,异常全限定名列表如有多个以“,”分割,如throws java.lang.IllegalArgumentException, java.lang.ArrayIndexOutOfBoundsException。
匹配Bean名称:可以使用Bean的id或name进行匹配,并且可使用通配符“*”;
6.5.3 组合切入点表达式
AspectJ使用 且(&&)、或(||)、非(!)来组合切入点表达式。
在Schema风格下,由于在XML中使用“&&”需要使用转义字符“&&”来代替之,所以很不方便,因此Spring AOP 提供了and、or、not来代替&&、||、!。
https://docs.spring.io/spring/docs/current/spring-framework-reference/html/aop.html
11.2 @AspectJ support
@AspectJ refers to a style of declaring aspects as regular Java classes annotated with annotations. The @AspectJ style was introduced by the AspectJ project as part of the AspectJ 5 release. Spring interprets the same annotations as AspectJ 5, using a library supplied by AspectJ for pointcut parsing and matching. The AOP runtime is still pure Spring AOP though, and there is no dependency on the AspectJ compiler or weaver.
Using the AspectJ compiler and weaver enables use of the full AspectJ language, and is discussed in Section 11.8, “Using AspectJ with Spring applications”. |
11.2.1 Enabling @AspectJ Support
To use @AspectJ aspects in a Spring configuration you need to enable Spring support for configuring Spring AOP based on @AspectJ aspects, and autoproxying beans based on whether or not they are advised by those aspects. By autoproxying we mean that if Spring determines that a bean is advised by one or more aspects, it will automatically generate a proxy for that bean to intercept method invocations and ensure that advice is executed as needed.
The @AspectJ support can be enabled with XML or Java style configuration. In either case you will also need to ensure that AspectJ’s aspectjweaver.jar
library is on the classpath of your application (version 1.6.8 or later). This library is available in the lib
directory of an AspectJ distribution or via the Maven Central repository.
Enabling @AspectJ Support with Java configuration
To enable @AspectJ support with Java @Configuration
add the @EnableAspectJAutoProxy
annotation:
@Configuration
@EnableAspectJAutoProxy
public class AppConfig
Enabling @AspectJ Support with XML configuration
To enable @AspectJ support with XML based configuration use the aop:aspectj-autoproxy
element:
<aop:aspectj-autoproxy/>
This assumes that you are using schema support as described in Chapter 41, XML Schema-based configuration. See Section 41.2.7, “the aop schema” for how to import the tags in the aop
namespace.
11.2.2 Declaring an aspect
With the @AspectJ support enabled, any bean defined in your application context with a class that is an @AspectJ aspect (has the @Aspect
annotation) will be automatically detected by Spring and used to configure Spring AOP. The following example shows the minimal definition required for a not-very-useful aspect:
A regular bean definition in the application context, pointing to a bean class that has the @Aspect
annotation:
<bean id="myAspect" class="org.xyz.NotVeryUsefulAspect">
<!-- configure properties of aspect here as normal -->
</bean>
And the NotVeryUsefulAspect
class definition, annotated with org.aspectj.lang.annotation.Aspect
annotation;
package org.xyz;
import org.aspectj.lang.annotation.Aspect;
@Aspect
public class NotVeryUsefulAspect
Aspects (classes annotated with @Aspect
) may have methods and fields just like any other class. They may also contain pointcut, advice, and introduction (inter-type) declarations.
You may register aspect classes as regular beans in your Spring XML configuration, or autodetect them through classpath scanning - just like any other Spring-managed bean. However, note that the @Aspect annotation is not sufficient for autodetection in the classpath: For that purpose, you need to add a separate @Component annotation (or alternatively a custom stereotype annotation that qualifies, as per the rules of Spring’s component scanner). |
In Spring AOP, it is not possible to have aspects themselves be the target of advice from other aspects. The @Aspect annotation on a class marks it as an aspect, and hence excludes it from auto-proxying. |
11.2.3 Declaring a pointcut
Recall that pointcuts determine join points of interest, and thus enable us to control when advice executes. Spring AOP only supports method execution join points for Spring beans, so you can think of a pointcut as matching the execution of methods on Spring beans. A pointcut declaration has two parts: a signature comprising a name and any parameters, and a pointcut expression that determines exactly which method executions we are interested in. In the @AspectJ annotation-style of AOP, a pointcut signature is provided by a regular method definition, and the pointcut expression is indicated using the @Pointcut
annotation (the method serving as the pointcut signature must have a void
return type).
An example will help make this distinction between a pointcut signature and a pointcut expression clear. The following example defines a pointcut named anyOldTransfer
that will match the execution of any method named transfer
:
@Pointcut("execution(* transfer(..))")// the pointcut expression
private void anyOldTransfer() // the pointcut signature
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 the AspectJ Programming Guide (and for extensions, the AspectJ 5 Developers Notebook) or one of the books on AspectJ such as "Eclipse AspectJ" by Colyer et. al. or "AspectJ in Action" by Ramnivas Laddad.
Supported Pointcut Designators
Spring AOP supports the following AspectJ pointcut designators (PCD) for use in pointcut expressions:
Other pointcut types
The full AspectJ pointcut language supports additional pointcut designators that are not supported in Spring. These are: call, get, set, preinitialization, staticinitialization, initialization, handler, adviceexecution, withincode, cflow, cflowbelow, if, @this
, and @withincode
. Use of these pointcut designators in pointcut expressions interpreted by Spring AOP will result in an IllegalArgumentException
being thrown.
The set of pointcut designators supported by Spring AOP may be extended in future releases to support more of the AspectJ pointcut designators.
- execution - for matching method execution join points, this is the primary pointcut designator you will use when working with Spring AOP
- within - limits matching to join points within certain types (simply the execution of a method declared within a matching type when using Spring AOP)
- this - limits matching to join points (the execution of methods when using Spring AOP) where the bean reference (Spring AOP proxy) is an instance of the given type
- target - limits matching to join points (the execution of methods when using Spring AOP) where the target object (application object being proxied) is an instance of the given type
- args - limits matching to join points (the execution of methods when using Spring AOP) where the arguments are instances of the given types
- @target - limits matching to join points (the execution of methods when using Spring AOP) where the class of the executing object has an annotation of the given type
- @args - limits matching to join points (the execution of methods when using Spring AOP) where the runtime type of the actual arguments passed have annotations of the given type(s)
- @within - limits matching to join points within types that have the given annotation (the execution of methods declared in types with the given annotation when using Spring AOP)
- @annotation - limits matching to join points where the subject of the join point (method being executed in Spring AOP) has the given annotation
Because Spring AOP limits matching to only method execution join points, the discussion of the pointcut designators above gives a narrower definition than you will find in the AspectJ programming guide. In addition, AspectJ itself has type-based semantics and at an execution join point both this
and target
refer to the same object - the object executing the method. Spring AOP is a proxy-based system and differentiates between the proxy object itself (bound to this
) and the target object behind the proxy (bound to target
).
Due to the proxy-based nature of Spring’s AOP framework, protected methods are by definition not intercepted, neither for JDK proxies (where this isn’t applicable) nor for CGLIB proxies (where this is technically possible but not recommendable for AOP purposes). As a consequence, any given pointcut will be matched against public methods only! If your interception needs include protected/private methods or even constructors, consider the use of Spring-driven native AspectJ weaving instead of Spring’s proxy-based AOP framework. This constitutes a different mode of AOP usage with different characteristics, so be sure to make yourself familiar with weaving first before making a decision. |
Spring AOP also supports an additional PCD named bean
. This PCD allows you to limit the matching of join points to a particular named Spring bean, or to a set of named Spring beans (when using wildcards). The bean
PCD has the following form:
bean(idOrNameOfBean)
The idOrNameOfBean
token can be the name of any Spring bean: limited wildcard support using the *
character is provided, so if you establish some naming conventions for your Spring beans you can quite easily write a bean
PCD expression to pick them out. As is the case with other pointcut designators, the bean
PCD can be &&ed, ||ed, and ! (negated) too.
Please note that the The |
Combining pointcut expressions
Pointcut expressions can be combined using &&, || and !. It is also possible to refer to pointcut expressions by name. The following example shows three pointcut expressions: anyPublicOperation
(which matches if a method execution join point represents the execution of any public method); inTrading
(which matches if a method execution is in the trading module), and tradingOperation
(which matches if a method execution represents any public method in the trading module).
@Pointcut("execution(public * *(..))")
private void anyPublicOperation()
@Pointcut("within(com.xyz.someapp.trading..*)")
private void inTrading()
@Pointcut("anyPublicOperation() && inTrading()")
private void tradingOperation()
It is a best practice to build more complex pointcut expressions out of smaller named components as shown above. When referring to pointcuts by name, normal Java visibility rules apply (you can see private pointcuts in the same type, protected pointcuts in the hierarchy, public pointcuts anywhere and so on). Visibility does not affect pointcut matching.
Sharing common pointcut definitions
When working with enterprise applications, you often want to refer to modules of the application and particular sets of operations from within several aspects. We recommend defining a "SystemArchitecture" aspect that captures common pointcut expressions for this purpose. A typical such aspect would look as follows:
package com.xyz.someapp;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
@Aspect
public class SystemArchitecture
/**
* A join point is in the web layer if the method is defined
* in a type in the com.xyz.someapp.web package or any sub-package
* under that.
*/
@Pointcut("within(com.xyz.someapp.web..*)")
public void inWebLayer()
/**
* A join point is in the service layer if the method is defined
* in a type in the com.xyz.someapp.service package or any sub-package
* under that.
*/
@Pointcut("within(com.xyz.someapp.service..*)")
public void inServiceLayer()
/**
* A join point is in the data access layer if the method is defined
* in a type in the com.xyz.someapp.dao package or any sub-package
* under that.
*/
@Pointcut("within(com.xyz.someapp.dao..*)")
public void inDataAccessLayer()
/**
* A business service is the execution of any method defined on a service
* interface. This definition assumes that interfaces are placed in the
* "service" package, and that implementation types are in sub-packages.
*
* If you group service interfaces by functional area (for example,
* in packages com.xyz.someapp.abc.service and com.xyz.someapp.def.service) then
* the pointcut expression "execution(* com.xyz.someapp..service.*.*(..))"
* could be used instead.
*
* Alternatively, you can write the expression using the bean
* PCD, like so "bean(*Service)". (This assumes that you have
* named your Spring service beans in a consistent fashion.)
*/
@Pointcut("execution(* com.xyz.someapp..service.*.*(..))")
public void businessService()
/**
* A data access operation is the execution of any method defined on a
* dao interface. This definition assumes that interfaces are placed in the
* "dao" package, and that implementation types are in sub-packages.
*/
@Pointcut("execution(* com.xyz.someapp.dao.*.*(..))")
public void dataAccessOperation()
The pointcuts defined in such an aspect can be referred to anywhere that you need a pointcut expression. For example, to make the service layer transactional, you could write:
<aop:config>
<aop:advisor
pointcut="com.xyz.someapp.SystemArchitecture.businessService()"
advice-ref="tx-advice"/>
</aop:config>
<tx:advice id="tx-advice">
<tx:attributes>
<tx:method name="*" propagation="REQUIRED"/>
</tx:attributes>
</tx:advice>
The <aop:config>
and <aop:advisor>
elements are discussed in Section 11.3, “Schema-based AOP support”. The transaction elements are discussed in Chapter 17, Transaction Management.
Examples
Spring AOP users are likely to use the execution
pointcut designator the most often. The format of an execution expression is:
execution(modifiers-pattern? ret-type-pattern declaring-type-pattern?name-pattern(param-pattern)
throws-pattern?)
All parts except the returning type pattern (ret-type-pattern in the snippet above), name pattern, and parameters pattern are optional. The returning type pattern determines what the return type of the method must be in order for a join point to be matched. Most frequently you will use *
as the returning type pattern, which matches any return type. A fully-qualified type name will match only when the method returns the given type. The name pattern matches the method name. You can use the *
wildcard as all or part of a name pattern. If specifying a declaring type pattern then include a trailing .
to join it to the name pattern component. The parameters pattern is slightly more complex: ()
matches a method that takes no parameters, whereas (..)
matches any number of parameters (zero or more). The pattern (*)
matches a method taking one parameter of any type, (*,String)
matches a method taking two parameters, the first can be of any type, the second must be a String. Consult the Language Semantics section of the AspectJ Programming Guide for more information.
Some examples of common pointcut expressions are given below.
- the execution of any public method:
execution(public * *(..))
- the execution of any method with a name beginning with "set":
execution(* set*(..))
- the execution of any method defined by the
AccountService
interface:
execution(* com.xyz.service.AccountService.*(..))
- the execution of any method defined in the service package:
execution(* com.xyz.service.*.*(..))
- the execution of any method defined in the service package or a sub-package:
execution(* com.xyz.service..*.*(..))
- any join point (method execution only in Spring AOP) within the service package:
within(com.xyz.service.*)
- any join point (method execution only in Spring AOP) within the service package or a sub-package:
within(com.xyz.service..*)
- any join point (method execution only in Spring AOP) where the proxy implements the
AccountService
interface:
this(com.xyz.service.AccountService)
this is more commonly used in a binding form :- see the following section on advice for how to make the proxy object available in the advice body. |
- any join point (method execution only in Spring AOP) where the target object implements the
AccountService
interface:
target(com.xyz.service.AccountService)
target is more commonly used in a binding form :- see the following section on advice for how to make the target object available in the advice body. |
- any join point (method execution only in Spring AOP) which takes a single parameter, and where the argument passed at runtime is
Serializable
:
args(java.io.Serializable)
args is more commonly used in a binding form :- see the following section on advice for how to make the method arguments available in the advice body. |
Note that the pointcut given in this example is different to execution(* *(java.io.Serializable))
: the args version matches if the argument passed at runtime is Serializable, the execution version matches if the method signature declares a single parameter of type Serializable
.
- any join point (method execution only in Spring AOP) where the target object has an
@Transactional
annotation:
@target(org.springframework.transaction.annotation.Transactional)
@target can also be used in a binding form :- see the following section on advice for how to make the annotation object available in the advice body. |
- any join point (method execution only in Spring AOP) where the declared type of the target object has an
@Transactional
annotation:
@within(org.springframework.transaction.annotation.Transactional)
@within can also be used in a binding form :- see the following section on advice for how to make the annotation object available in the advice body. |
- any join point (method execution only in Spring AOP) where the executing method has an
@Transactional
annotation:
@annotation(org.springframework.transaction.annotation.Transactional)
@annotation can also be used in a binding form :- see the following section on advice for how to make the annotation object available in the advice body. |
- any join point (method execution only in Spring AOP) which takes a single parameter, and where the runtime type of the argument passed has the
@Classified
annotation:
@args(com.xyz.security.Classified)
@args can also be used in a binding form :- see the following section on advice for how to make the annotation object(s) available in the advice body. |
- any join point (method execution only in Spring AOP) on a Spring bean named
tradeService
:
bean(tradeService)
- any join point (method execution only in Spring AOP) on Spring beans having names that match the wildcard expression
*Service
:
bean(*Service)
Writing good pointcuts
During compilation, AspectJ processes pointcuts in order to try and optimize matching performance. Examining code and determining if each join point matches (statically or dynamically) a given pointcut is a costly process. (A dynamic match means the match cannot be fully determined from static analysis and a test will be placed in the code to determine if there is an actual match when the code is running). On first encountering a pointcut declaration, AspectJ will rewrite it into an optimal form for the matching process. What does this mean? Basically pointcuts are rewritten in DNF (Disjunctive Normal Form) and the components of the pointcut are sorted such that those components that are cheaper to evaluate are checked first. This means you do not have to worry about understanding the performance of various pointcut designators and may supply them in any order in a pointcut declaration.
However, AspectJ can only work with what it is told, and for optimal performance of matching you should think about what they are trying to achieve and narrow the search space for matches as much as possible in the definition. The existing designators naturally fall into one of three groups: kinded, scoping and context:
- Kinded designators are those which select a particular kind of join point. For example: execution, get, set, call, handler
- Scoping designators are those which select a group of join points of interest (of probably many kinds). For example: within, withincode
- Contextual designators are those that match (and optionally bind) based on context. For example: this, target, @annotation
A well written pointcut should try and include at least the first two types (kinded and scoping), whilst the contextual designators may be included if wishing to match based on join point context, or bind that context for use in the advice. Supplying either just a kinded designator or just a contextual designator will work but could affect weaving performance (time and memory used) due to all the extra processing and analysis. Scoping designators are very fast to match and their usage means AspectJ can very quickly dismiss groups of join points that should not be further processed - that is why a good pointcut should always include one if possible.
11.2.4 Declaring advice
Advice is associated with a pointcut expression, and runs before, after, or around method executions matched by the pointcut. The pointcut expression may be either a simple reference to a named pointcut, or a pointcut expression declared in place.
Before advice
Before advice is declared in an aspect using the @Before
annotation:
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
@Aspect
public class BeforeExample
@Before("com.xyz.myapp.SystemArchitecture.dataAccessOperation()")
public void doAccessCheck()
// ...
If using an in-place pointcut expression we could rewrite the above example as:
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
@Aspect
public class BeforeExample
@Before("execution(* com.xyz.myapp.dao.*.*(..))")
public void doAccessCheck()
// ...
After returning advice
After returning advice runs when a matched method execution returns normally. It is declared using the @AfterReturning
annotation:
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.AfterReturning;
@Aspect
public class AfterReturningExample
@AfterReturning("com.xyz.myapp.SystemArchitecture.dataAccessOperation()")
public void doAccessCheck()
// ...
Note: it is of course possible to have multiple advice declarations, and other members as well, all inside the same aspect. We’re just showing a single advice declaration in these examples to focus on the issue under discussion at the time. |
Sometimes you need access in the advice body to the actual value that was returned. You can use the form of @AfterReturning
that binds the return value for this:
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.AfterReturning;
@Aspect
public class AfterReturningExample
@AfterReturning(
pointcut="com.xyz.myapp.SystemArchitecture.dataAccessOperation()",
returning="retVal")
public void doAccessCheck(Object retVal)
// ...
The name used in the returning
attribute must correspond to the name of a parameter in the advice method. When a method execution returns, the return value will be passed to the advice method as the corresponding argument value. A returning
clause also restricts matching to only those method executions that return a value of the specified type ( Object
in this case, which will match any return value).
Please note that it is not possible to return a totally different reference when using after-returning advice.
After throwing advice
After throwing advice runs when a matched method execution exits by throwing an exception. It is declared using the @AfterThrowing
annotation:
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.AfterThrowing;
@Aspect
public class AfterThrowingExample
@AfterThrowing("com.xyz.myapp.SystemArchitecture.dataAccessOperation()")
public void doRecoveryActions()
// ...
Often you want the advice to run only when exceptions of a given type are thrown, and you also often need access to the thrown exception in the advice body. Use thethrowing
attribute to both restrict matching (if desired, use Throwable
as the exception type otherwise) and bind the thrown exception to an advice parameter.
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.AfterThrowing;
@Aspect
public class AfterThrowingExample
@AfterThrowing(
pointcut="com.xyz.myapp.SystemArchitecture.dataAccessOperation()",
throwing="ex")
public void doRecoveryActions(DataAccessException ex)
// ...
The name used in the throwing
attribute must correspond to the name of a parameter in the advice method. When a method execution exits by throwing an exception, the exception will be passed to the advice method as the corresponding argument value. A throwing
clause also restricts matching to only those method executions that throw an exception of the specified type ( DataAccessException
in this case).
After (finally) advice
After (finally) advice runs however a matched method execution exits. It is declared using the @After
annotation. After advice must be prepared to handle both normal and exception return conditions. It is typically used for releasing resources, etc.
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.After;
@Aspect
public class AfterFinallyExample
@After("com.xyz.myapp.SystemArchitecture.dataAccessOperation()")
public void doReleaseLock()
// ...
Around advice
The final kind of advice is around advice. Around advice runs "around" a matched method execution. It has the opportunity to do work both before and after the method executes, and to determine when, how, and even if, the method actually gets to execute at all. Around advice is often used if you need to share state before and after a method execution in a thread-safe manner (starting and stopping a timer for example). Always use the least powerful form of advice that meets your requirements (i.e. don’t use around advice if simple before advice would do).
Around advice is declared using the @Around
annotation. The first parameter of the advice method must be of type ProceedingJoinPoint
. Within the body of the advice, calling proceed()
on the ProceedingJoinPoint
causes the underlying method to execute. The proceed
method may also be called passing in an Object[]
- the values in the array will be used as the arguments to the method execution when it proceeds.
The behavior of proceed when called with an Object[] is a little different t 以上是关于@AspectJ support (good)的主要内容,如果未能解决你的问题,请参考以下文章 python https://www.quora.com/Does-Python-have-good-support-for-socket-programming/answer/Deepanshu-M |