스프링 프레임 워크와 스프링 웹 플로우를 사용하여 개발 된 j2ee 애플리케이션이 있습니다. 현재 나의 모든 url 요청은 Web Flow를 거치게됩니다. 내가 원하는 것은 웹 플로우 또는 일반 스프링 MVC 컨트롤러로 보낼지 여부를 선택할 수 있어야한다는 것입니다. 나는 그것을 어떻게 커스텀 컨트롤러로 보낼지 전혀 모른다. 어떻게해야합니까?스프링 MVC - 웹 플로우 컨트롤러
나는 나의 web.xml에이를 가진 시도하지만 난
<servlet>
<servlet-name>mytest</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet>
<servlet-name>mytest2</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>contextConfigLocation2</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>mytest</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mytest2</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/web-application-config.xml
</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation2</param-name>
<param-value>
/WEB-INF/mytest2-servlet.xml
</param-value>
</context-param>
[스프링 웹 플로우 : 스프링 MVC 통합] (http://static.springsource.org/spring-webflow/docs/2.0.x/reference/html/ch10.html)을 참고하기 바란다. –
사용자가 제공 한 링크에서 사용자 지정 흐름 처리기 항목이 무엇이 필요한가에 가깝습니다. 웹 플로우가 아닌 다른 컨트롤러로 요청을 보내는 방법이 있습니까? 내 질문에 뭔가를 추가했습니다. – cedric
Spring에서 다른 방법이 없다면 일반 Servet Filter로 처리 할 수 있습니다. 사실, 현재 Spring과 함께 작업하지 않으며, 마지막으로 작업한지 2 년이 넘었습니다. –