Upgrade of Spring webflow 1.0 to 2.4.2

I'm very much new to spring webflow framework and I have been working on upgrading the existing project on spring webflow 1.0 to use spring webflow 2.4.2 latest framework. Currently on our project we are using the defaultFlowId in dispatcher-servlet.xml and there is a corresponding setter method at FlowController.java of spring webflow 1.0 but it is not available with the current webflow framework.

I would like to understand if there is any alternative for the same ?

(dispatcher-servlet.xml)

<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    <property name="mappings">
        <value>
            /**/index.htm=loginController
        </value>
    </property>
</bean>

<bean name="loginController"  class="com.example.ui.controllers.LoginController">
    <property name="defaultFlowId" value="init-flow" />
    <property name="flowExecutor" ref="flowExecutor" />
</bean>

Now it says, Caused By: org.springframework.beans.NotWritablePropertyException: Invalid property 'defaultFlowId' of bean class [com.example.ui.controllers.LoginController]: Bean property 'defaultFlowId' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

Since there is no setDefaultFlowId() in latest FlowController.java of org.springframework.webflow.mvc.servlet.FlowController

Anyone who worked/used the above method ? or can i know whether we can define the same kind of defaultId in other ways ?

Any help would be greatly appreciated !


We have upgraded. Here is the flow definition that we are required to use in order that the flow is maintained and default flow is used:

  <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
        <property name="mappings">
            <value>
                /**/index.htm=yourController
            </value>
        </property>
    </bean>

And the rest:

   <webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices">
        <webflow:flow-location id="index" path="/WEB-INF/initialflow.xml" />
    </webflow:flow-registry>
链接地址: http://www.djcxy.com/p/39166.html

上一篇: 使用Spring Security解除Spring流的安全性

下一篇: Spring webflow 1.0升级到2.4.2