<aop:config>
<aop:aspect id="nIntercepter" ref="loginCheckAspect">
<aop:around pointcut="execution(* *..*ServiceImpl.*(..)) )"
method="serviceIntercept" />
</aop:aspect>
</aop:config>
public abstract class BaseService {
public BaseService()
{
}
public abstract String getPmId();
public abstract void ResetG();
}
public class LoginCheckInterceptor
implements Ordered
{
public LoginCheckInterceptor()
{
}
public void serviceIntercept(ProceedingJoinPoint pjp)
throws Throwable
{
BaseService baseService = (BaseService)pjp.getTarget();
baseService.ResetG();
}
public int getOrder()
{
return order;
}
public void setOrder(int order)
{
this.order = order;
}
private int order;
}
No comments:
Post a Comment