Execution of any public method:
Execution (Public * * (.. ))
The execution of a method whose name starts with a set:
Execution (* set* (.. ))
Accountservice the execution of any method defined by the interface:
Execution (* com.xyz.service.accountservice.* (.. ))
Execution of any method defined in the service package:
Execution (* com.xyz.service.*.* (.. ))
Execution of any method defined in a service package or its child packages:
Execution (* com.xyz.service). *.*(.. ))
Any connection point in the service package (only method execution in Spring AOP):
Within (com.xyz.service.*)
Any connection point in the service package or its child package (only method execution in Spring AOP):
Within (Com.xyz.service. *)
Any connection point that implements the proxy object for the Accountservice interface (only method execution in Spring AOP):
This (Com.xyz.service.AccountService)
Any connection point that implements the target object of the Accountservice interface (only method execution in Spring AOP):
Target (Com.xyz.service.AccountService)
Either one takes only one parameter, and the arguments passed in at run time are the connection points of the Serializable interface (only method execution in Spring AOP):
Args (java.io.Serializable)
Note that the pointcut given in the example differs from execution (* * (Java.io.Serializable)), and the args version only matches when the parameter is Serializable when it is run dynamically, and execution The version declares a parameter of only one Serializable type in the method signature when matching.
There is an arbitrary connection point in the target object that @Transactional annotations (only method execution in Spring AOP):
@target (org.springframework.transaction.annotation.Transactional)
The type of any target object declaration has a connection point that @Transactional annotations (only method execution in Spring AOP):
@within (org.springframework.transaction.annotation.Transactional)
Any one of the methods executed has a connection point @Transactional annotations (only method execution in Spring AOP):
@annotation (org.springframework.transaction.annotation.Transactional)
Either one accepts only one parameter, and the parameter type passed in by the runtime has a connection point that @Classified annotations (only method execution in Spring AOP):
@args (com.xyz.security.Classified)
Any connection point above the spring bean named TradeService (only method execution in spring AOP):
Bean (TradeService)
Any *Service
connection point above a spring bean whose name matches a wildcard expression (only method execution in spring AOP):
Bean (*service)
Among them,,,,, this
tagart
args
@target
@with
, @annotation
and @args
in the binding form are more commonly used.
Reprint statement: This article is from the "Lava" blog, spring pointcut expressions commonly used in the wording.
Common notation for spring pointcut expressions