SSH中在Action中用Spring的aop来验证用户是否已经登录的拦截器
1.Spring的aop来验证用户是否已经登录的拦截器
?
?2.相应的在Spring中的applicationContext.xml中的配置
<bean id="commentInter" class="angus.interceptor.CommentInterceptor"/>
??? <bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
???? <property name="beanNames">
??????????? <list>
??????????????? <value>/addComment</value>
??????????? </list>
???? </property>
??????? <property name="interceptorNames">
??????????? <list>
??????????????? <value>commentInter</value>
??????????? </list>
??????? </property>
??? </bean>