Groovy轻松入门——Grails实战之Web Flow篇

豆豆网   技术应用频道   2008年01月22日  【字号: 收藏本文

内容摘要:Spring Web Flow是Spring家族中的一位成员,他能简化Web应用的开发。在Grails0.6中就集成了Spring Web Flow这一Web应用开发利器。下面通过一个实例向大家展示一下在Grails中如何方便的使用Spring Web Flow。

  Spring Web Flow是Spring家族中的一位成员,他能简化Web应用的开发。在Grails0.6中就集成了Spring Web Flow这一Web应用开发利器。下面通过一个实例向大家展示一下在Grails中如何方便的使用Spring Web Flow。

  1,“grails create-app WebFlowDemo”,输出如下:

D:_DEVgrails_apps>grails create-app WebFlowDemo
Welcome to Grails 0.6 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: D:DMY_DEVgrails0.6
Base Directory: D:_DEVgrails_apps
Environment set to development
Note: No plugin scripts found
Running script D:DMY_DEVgrails0.6scriptsCreateApp.groovy
Overriding previous definition of reference to groovyJarSet
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemosrc
[mkdir] Created dir:
D:_DEVgrails_appsWebFl
owDemosrcjava
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemosrcgroovy
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemograils-app
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemograils-appcontrollers
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemograils-appservices
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemograils-appdomain
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemograils-app  aglib
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemograils-apputils
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemograils-appviews
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemograils-appviewslayouts
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemograils-appi18n
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemograils-appconf
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemo  est
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemo  estunit
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemo  estintegration
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemoscripts
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemoweb-app
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemoweb-appjs
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemoweb-appcss
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemoweb-appimages
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemoweb-appWEB-INFclasses
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemoweb-appMETA-INF
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemolib
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemograils-appconfspring
[mkdir] Created dir:
D:_DEVgrails_appsWebFlowDemograils-appconfhibernate
[propertyfile] Creating new property file:
D:_DEVgrails_appsWebFlowDemoapplication.properties
[copy] Copying 2 files to
D:_DEVgrails_appsWebFlowDemo
[copy] Copying 2 files to
D:_DEVgrails_appsWebFlowDemoweb-appWEB-INF
[copy] Copying 5 files to
D:_DEVgrails_appsWebFlowDemoweb-appWEB-INF  ld
[copy] Copying 131 files to
D:_DEVgrails_appsWebFlowDemoweb-app
[copy] Copying 1 file to
D:_DEVgrails_appsWebFlowDemograils-appconf
[copy] Copying 13 files to
D:_DEVgrails_appsWebFlowDemograils-app
[copy] Copying 1 file to
D:_DEVgrails_appsWebFlowDemograils-appconfspring
[copy] Copying 1 file to
D:_DEVgrails_appsWebFlowDemo
[copy] Copying 1 file to
D:_DEVgrails_appsWebFlowDemo
[copy] Copying 1 file to
D:_DEVgrails_appsWebFlowDemo
[propertyfile] Updating property file:
D:_DEVgrails_appsWebFlowDemoapplication.properties
Created Grails Application at D:_DEVgrails_apps/WebFlowDemo
D:_DEVgrails_apps>

  2,“cd WebFlowDemo”,进入工程目录

  3,“grails create-domain-class User”,创建一个域类User,输出如下

作者:山风小子    责编:豆豆技术应用

正在加载评论...