SpringWebflow杂记(一) 框架初探,与SpringMVC的集成

今日研究了一下SpringWebFlow这个项目,作为Spring子项目,相对来说用得人稍微少一些。当然,这只是相对于Spring Security,
Spring Data 等项目来说。

我在我的一个玩具项目上用SpringWebFlow + SpringMVC 实现了一个较普通的用户注册流程
[url]https://github.com/yingzhuo/mycar[/url]
安装:需要本地(localhost)安装MySQL数据库5.1以上
mvn sql:execute
mvn install
mvn jetty:run
之后访问http://localhost:8080/ 即可进入登录页面,点击注册link即可启动flow

另外,这个项目还依赖我自己写的三个小开源软件,也要一并安装到本地maven库
https://github.com/yingzhuo/logback-ext
https://github.com/yingzhuo/gravatar4j
https://github.com/yingzhuo/captcha4j

1) web.xml
参考[url]https://github.com/yingzhuo/mycar/blob/master/mycar-webapp/web/WEB-INF/web.xml[/url]

2) spring-mvc.xml
参考[url]https://github.com/yingzhuo/mycar/blob/master/mycar-webapp/src/main/resources/spring-mvc.xml[/url]

3)spring-webflow.xml
参考[url]https://github.com/yingzhuo/mycar/blob/master/mycar-webapp/src/main/resources/spring-webflow.xml[/url]

4) flow的定义 spring-webflow采用xml文件来完整地定义一个流程
参考[url]https://github.com/yingzhuo/mycar/blob/master/mycar-webapp/src/main/java/com/github/yingzhuo/mycar/flow/flow-sign-up.xml[/url]

效果图
[img]http://dl.iteye.com/upload/picture/pic/128123/1f3b8fee-acfa-38d3-9194-069157fdc075.png[/img]
[img]http://dl.iteye.com/upload/picture/pic/128125/8fb5916e-ecd3-369c-959f-b663834ada16.png[/img]
[img]http://dl.iteye.com/upload/picture/pic/128127/1298e8bc-ca30-3bd0-924f-521a45b777c0.png[/img]
[img]http://dl.iteye.com/upload/picture/pic/128129/2471c235-9260-3f9c-a3ec-c7250ff62c0f.png[/img]
[img]http://dl.iteye.com/upload/picture/pic/128131/bdae6fe3-8724-38b8-b05f-e226e0b28cbb.png[/img]
[img]http://dl.iteye.com/upload/picture/pic/128133/e4514952-2340-3453-92fe-0bebcc3c577e.png[/img]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值