經過漫長的谷歌我無法找到任何Spring Web流與Hibernate示例Example.Can任何人幫助我簡單的Spring Web流example.I需要創建一個登錄表單與Spring Web流。現在我仍然熟悉Spring web流程。如果使用Hibernate連接到數據庫的任何示例應用程序(如登錄表單)將會很有幫助。春季Web流與休眠
0
A
回答
1
如果你不能找到示例代碼是不是太難的設置,SWF只是一個控制器,並註冊在Spring MVC與一些性能控制器:
<!-- Creates a flow executor in Spring, responsible for creating and executing flows -->
<flow:flow-executor id="flowExecutor" flow-registry="flowRegistry" />
<!-- Load flow definitions and make them available to the flow executor -->
<flow:flow-registry id="flowRegistry">
<flow:flow-location id="process-flow" path="/process/flows/process-flow.xml" />
</flow:flow-registry>
<!-- The FlowHandlerMapping helps DispatcherServlet to knowing that it should send flow requests to Spring Web Flow -->
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
<property name="flowRegistry" ref="flowRegistry" />
</bean>
<!-- The FlowHandlerAdapter is equivalent to a Spring MVC controller in that it handles requests coming in for a flow and processes those requests -->
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerAdapter">
<property name="flowExecutor" ref="flowExecutor" />
</bean>
一旦你有你只需要像使用其他MVC應用程序一樣使用Hibernate。也許你會對使用FlowScoped PersistenceContext感興趣,這使得SWF能夠管理你的域對象(http://static.springsource.org/spring-webflow/docs/2.3.x/reference/html/ch07s02.html)。
請考慮閱讀SWF官方文檔(http://static.springsource.org/spring-webflow/docs/2.3.x/reference/html/index.html)。
0
集成Hibernate和Spring Web流程不是一件困難的事情。它和Spring MVC一樣。只需編寫Hibernate配置文件.Call Service層,在服務層調用各自的DAO。 DAO將與數據庫進行交互。
相關問題
- 1. 春季休眠ManyToMany
- 2. OpenSessionInView與交易? (春季/休眠/ JPA)
- 3. 春季輪詢+休眠
- 4. 春季休眠 - 交易
- 5. 春季休眠ehcache設置
- 6. 春季休眠驗證@RequestBody
- 7. 春季和休眠配置
- 8. 春季休眠不更新實體
- 9. 春季和休眠運行時錯誤
- 10. 春季休眠事務日誌
- 11. 春季休眠連接泄漏
- 12. 春季4和休眠5集成
- 13. 休眠+春季例外:未知實體
- 14. 春季自動裝配+休眠搜索
- 15. 註冊新用戶春季和休眠
- 16. 休眠5,春季4.1集成配置
- 17. 春季和休眠保存不工作
- 18. 春季休眠獲取選定的列
- 19. 異常運行春季休眠應用
- 20. 春季開機休眠慢啓動
- 21. (春季)JPA /休眠奇怪的行爲
- 22. 春季引導 - 休眠 - 表不存在
- 23. 春季休眠 - 共享會話DAOs
- 24. 休眠/春季新手架構
- 25. 春季安全3.2.3休眠配置
- 26. 春季項目使用休眠工具
- 27. 春季休眠交易 - 捕捉22
- 28. 春季休眠異常處理
- 29. Excel文件導入java春季休眠
- 30. 春季安全與休眠,存儲加密密碼
這是對用戶問題的相當晚的回覆,您應該嘗試使用英語更清晰。 – simonmorley