First, expression is defined as follows:
The full type of expression, as follows:
Execution (Modifiers-pattern ret-type-pattern declaring-type-pattern? Name-pattern (Param-pattern) Throws-pattern?)
Modifiers-pattern representative modifier (public/protect, etc.)
Ret-type-pattern represents the return type (Int/string/long, etc.)
Declaring-type-pattern represents the matching path (which is under what package)
Name-pattern represents matching method name Throws-pattern exception match type
You can not fill in the back with a question mark. is the meaning of 0 or 1 in a regular expression.
The return type mode determines that the return type of the method must match one connection point in turn. The most frequent return type pattern you will use is *, which represents the matching of any return type. A full-qualified type name will only match the method that returns the given type. The name pattern matches the method name. You can use the * wildcard character as all or part of the naming pattern. The parameter pattern is slightly more complex: () matches a method that does not accept any parameters, and (..) matches a method that accepts any number of parameters (0 or more). The pattern (*) matches a method that accepts a parameter of any type. Mode (*,string) matches a method that accepts two parameters, the first of which can be any type, and the second must be of type String. See the language Semantics section of the ASPECTJ Programming Guide.
Next, follow a configuration in my project to explain:
<aop:config>
<aop:pointcut id= "mybatis_pc"
expression= "Execution (* com.service.impl.*.*.* (..))" />
<aop:advisor advice-ref= "Mybatis_advice" pointcut-ref= "mybatis_pc"/>
</aop:config>
Excerpt from: http://blog.csdn.net/h396071018/article/details/6675129