`

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

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

我在我的一个玩具项目上用SpringWebFlow + SpringMVC 实现了一个较普通的用户注册流程
https://github.com/yingzhuo/mycar
安装:需要本地(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
参考https://github.com/yingzhuo/mycar/blob/master/mycar-webapp/web/WEB-INF/web.xml

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

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

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

效果图





分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics