領先一步
VMware 提供培訓和認證,助您快速進步。
瞭解更多Spring Web Flow 是 Spring 社群的一個產品,專注於協調 Web 應用程式中的使用者介面流程。
此版本包含許多改進和幾個令人興奮的新功能。 我們認為它是迄今為止最穩定的版本,並且最終,此版本使 Spring Web Flow 1.0 最終路線圖的功能已完成。 Spring Web Flow 1.0 最終版將在下週釋出,改動最小。 從現在到那時,我們鼓勵您測試 1.0 RC4,以便在 1.0 正式釋出之前幫助發現任何剩餘問題。
請注意,此版本中存在影響使用者的更改。 1.0 RC3 或更早版本的使用者應查閱 升級指南,其中詳細概述了這些更改。
1.0 RC4 中的新增和重要特性列表令人興奮,包括:
新增和重要特性
作為 Spring Web Flow 1.0 最終版之前的最後一個釋出候選版本,Spring Web Flow 1.0 RC4 引入了強大的新功能,例如渲染操作 (1)、評估操作 (2)、設定操作 (3)、快閃記憶體範圍 (4)、流程執行屬性 (5) 和暫停時始終重定向 (6)。它提供了增強的文件、更好的流程定義驗證、智慧預設值以及用於配置流程執行引擎的完整自定義 Spring 2.0 配置模式 (7)。
<view-state id="displayResults" view="searchResults">
<render-actions>
<bean-action bean="phonebook" method="search">
<method-arguments>
<argument expression="flowScope.searchCriteria"/>
</method-arguments>
<method-result name="results"/>
</bean-action>
</render-actions>
<transition on="newSearch" to="enterCriteria"/>
<transition on="select" to="browseDetails"/>
</view-state>
<action-state id="makeGuess">
<evaluate-action expression="flowScope.game.makeGuess(requestParameters.guess)">
<evaluation-result name="guessResult"/>
</evaluate-action>
<transition on="CORRECT" to="showAnswer"/>
<transition on="*" to="enterGuess"/>
<transition on-exception="java.lang.NumberFormatException" to="enterGuess"/>
</action-state>
<action-state id="uploadFile">
<action bean="uploadAction" method="uploadFile"/>
<transition on="success" to="selectFile">
<set attribute="fileUploaded" scope="flash" value="true"/>
</transition>
</action-state>
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-1.0.xsd">
<start-state idref="selectFile"/>
<view-state id="selectFile" view="fileForm">
<transition on="submit" to="uploadFile"/>
</view-state>
<action-state id="uploadFile">
<action bean="uploadAction" method="uploadFile"/>
<transition on="success" to="selectFile">
<set attribute="fileUploaded" scope="flash" value="true"/>
</transition>
</action-state>
</flow>
<flow:executor id="flowExecutor" registry-ref="flowRegistry">
<flow:execution-attributes>
<flow:alwaysRedirectOnPause value="false"/>
</flow:execution-attributes>
</flow:executor>
<?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:flow="http://www.springframework.org/schema/webflow-config"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config-1.0.xsd">
<!-- Launches new flow executions and resumes existing executions. -->
<flow:executor id="flowExecutor" registry-ref="flowRegistry"/>
<!-- Creates the registry of flow definitions for this application -->
<flow:registry id="flowRegistry">
<flow:location path="/WEB-INF/flows/**-flow.xml"/>
</flow:registry>
</beans>
有關這些功能的更多資訊,請參閱參考手冊。 Spring Web Flow 1.0 RC4 進一步完善了參考文件,提供了 70 頁關於 SWF 使用的說明。 該手冊可線上獲取,格式為 HTML 和 PDF。
入門指南
學習 Spring Web Flow 的最佳方法之一是檢視和演練示例應用程式。 我們建議從一開始就檢視所有示例,並根據需要補充參考手冊材料。該版本附帶了十個示例應用程式,每個應用程式都演示了一組獨特的產品功能。 這些示例是
要快速評估並構建示例應用程式,只需
所有示例專案都是 Spring IDE 專案,可以直接匯入 Eclipse。
感謝所有支援此版本的朋友們。 Spring Web Flow 1.0 終於... 就在眼前了。
祝您使用愉快!
Spring Web Flow 團隊