@Interceptor(value=Configuration.class) public class PersistConfigInterceptor extends Object implements BeanMethodInterceptor<Configuration>
| 构造器和说明 |
|---|
PersistConfigInterceptor() |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
intercept(Configuration annotation,
Object object,
Method method,
Object[] params,
BeanMethodInterceptorChain interceptorChain)
拦截器拦截某个方法时,使用该方法,在方法中通过逻辑决定是否继续调用拦截的方法,可以在调用之前和之后做一些业务上的操作
When an interceptor intercepts a method, the method is used to logically determine whether the intercepting method is called in the method,
and it can do some business operations before and after the call.
|
public Object intercept(Configuration annotation, Object object, Method method, Object[] params, BeanMethodInterceptorChain interceptorChain) throws Throwable
BeanMethodInterceptorintercept 在接口中 BeanMethodInterceptor<Configuration>annotation - 拦截方法的注解实例/Annotation instances of the intercepting method.object - 方法所属对象/Method ownermethod - 方法定义/Method definitionparams - 方法参数列表/Method parameter listinterceptorChain - 拦截器链Throwable - 该方法可能抛出异常,请谨慎处理/This method may throw an exception, handle with care.Copyright © 2021. All rights reserved.