Cut point expression (Spring)

Creative Commons License Copyright: Attribution, allow others to create paper-based, and must distribute paper (based on the original license agreement with the same license Creative Commons )

See these things at first glance is not feeling very ignorant, I'll explain how to see:

rule:

execution(modifiers-pattern?ret-type-pattern declaring-type-pattern?name-pattern(param-pattern) throws-pattern?)

Question mark: indicates the current item may or may not, where the semantics of the following table:  

Cut point expression Description
modifiers-pattern The method of visibility, such as public, protected;
right-type pattern The return value type of the method, such as int, void, etc.
declaring-type-pattern The full path name of the class where the method, such as com.yanlong.aop
name-pattern Type the method name, such as com.spring.Aspect
param-pattern .. The method of parameter types, such as java.lang.String
throws-pattern

: Type method throws an exception, as java.lang.Exception

idea: Do not cut all the recommendations, the proposed cut-off point the best time to add expression to configure the package name and class name method name names can be accurately screening cut-off point

 

Guess you like

Origin blog.csdn.net/longyanchen/article/details/94486678