SpringBoot: AOP aspect execution expression

The basic syntax format of an execution expression is:

execution(<modifier pattern>? <return type pattern><method name pattern>(<parameter pattern>) <exception pattern>?)

Note:
1. Except for the return type mode, method name mode and parameter mode, other items are optional.
2. Multiple execution expressions are connected by ||

For example:

@Pointcut(“execution(public * com..controller….*(…))”)

Description:
1. [Optional] Modifier mode. public means a public level method. You can not write, not to write is all methods (public, private, protected and other level methods).
2. [Required] Return type mode. Indicates the type of method return value, * means all.
3. [Required] Method name pattern. Indicates a wildcard; ... Indicates a package and subpackages under the package.
4. 【Required】Parameter mode. Brackets indicate parameters, and two dots indicate any parameter type. .
(…) means all methods.
5. [Optional] Abnormal pattern.

Guess you like

Origin blog.csdn.net/qq_29229567/article/details/120664687