读书人

aopalliance.intercept 现实应用

发布时间: 2012-10-28 09:54:44 作者: rapoo

aopalliance.intercept 实际应用

?? XML文件配置:

?? <?xml version="1.0" encoding="UTF-8"?>
<!--http://www.springframework.org/dtd/-->
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"

?"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>


<bean id="authManager" + e.getMessage());
?}

??return retVal;
?}

?

?

?private void process_buildAuthToken(MethodInvocation methodInvocation, AuthToken authToken) throws Throwable {
??List deptAncestors = (List) authToken.getAttribute("deptAncestors");
??String flowDept = getFlowStartDept(deptAncestors);
??
??if (flowDept != null&&(!"AHA".equals(flowDept))){
?自己要做的事情

??}

}


?}

?

?

?=======================================================

?

?? 应用代码

?

?AuthManager authManager = (AuthManager) getBean(AuthManager.BEAN_ID);
???AuthToken authToken = authManager.getAuthToken(userCode, password);

?

==============

附件JAR

读书人网 >软件架构设计

热点推荐