class AProxy{
public void fi(A a){
log()—-安全处理—》》 AOP面向切面的编程
validate–input输入校验
exception—-异常处理
a.f1();业务逻辑 b.f2(); c.f3();
}
}
使用拦截器
1.
定义拦截器
实现interceptor接口
继承AbstractInterceptor类
2.配置
interceptor需要申明
在action中使用申明的拦截器
struts.xml