嗨,朋友我工作會議在春季web流量,每個事件之前我想檢查會話是否存在或不爲這個我想要呼叫攔截器,所以我有問題配置攔截器在web流這裏id我的網絡流量。如何在Spring Web Flow的每個Dispatcher servlet之前調用攔截器?
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:faces="http://www.springframework.org/schema/faces"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<faces:resources />
<context:annotation-config />
<context:component-scan base-package="com.pcx.interceptor.check" />
<context:component-scan base-package="com.pcx.ui.converter" />
<mvc:interceptors>
<bean class="com.pcx.ui.converter.ExecuteTimeInterceptor" />
</mvc:interceptors>
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
<property name="order" value="1" />
<property name="flowRegistry" ref="flowRegistry" />
<property name="defaultHandler">
<bean class="org.springframework.web.servlet.mvc.UrlFilenameViewController" />
</property>
</bean>
<!-- Maps logical view names to Facelet templates in /WEB-INF (e.g. 'search'
to '/WEB-INF/search.xhtml' -->
<bean id="faceletsViewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.faces.mvc.JsfView" />
<property name="prefix" value="/WEB-INF/" />
<property name="suffix" value=".xhtml" />
</bean>
<!-- Dispatches requests mapped to org.springframework.web.servlet.mvc.Controller
implementations -->
<bean id="sssssssss"
class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" />
<!-- Dispatches requests mapped to flows to FlowHandler implementations -->
<bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter">
<property name="flowExecutor" ref="flowExecutor" />
</bean>
</beans>
問題是?雖然我可以猜測你的攔截器沒有被解僱。您需要通過設置「攔截器」屬性將其設置在「FlowHandlerMapping」中。 ' '將與' '一起使用。 –
2014-10-01 05:55:01
嗨@ M.Deinum你能解釋sir.how嗎? – user2189505 2014-10-01 06:13:29
@ M.Deinum我已經配置了AOP,但我怎樣才能調用攔截器先生 – user2189505 2014-10-01 06:15:02