锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
榪涘叆hello欏圭洰鏂囦歡澶?>cd hello)錛岃緭鍏?grails create-controller hello
E:\Groovy\projects\hello>grails create-controller hello
2
3Welcome to Grails 1.0.4 - http://grails.org/
4Licensed under Apache Standard License 2.0
5Grails home is set to: E:\Groovy\grails-1.0.4
6
7Base Directory: E:\Groovy\projects\hello
8Note: No plugin scripts found
9Running script E:\Groovy\grails-1.0.4\scripts\CreateController.groovy
10Environment set to development
11 [copy] Copying 1 file to E:\Groovy\projects\hello\grails-app\controllers
12Created Controller for Hello
13 [mkdir] Created dir: E:\Groovy\projects\hello\grails-app\views\hello
14 [copy] Copying 1 file to E:\Groovy\projects\hello\test\integration
15Created ControllerTests for Hello
2 def index = {render 'Hello world!' }
3 }
E:\Groovy\projects\hello>grails run-app
2
3Welcome to Grails 1.0.4 - http://grails.org/
4Licensed under Apache Standard License 2.0
5Grails home is set to: E:\Groovy\grails-1.0.4
6
7Base Directory: E:\Groovy\projects\hello
8Note: No plugin scripts found
9Running script E:\Groovy\grails-1.0.4\scripts\RunApp.groovy
10Environment set to development
11 [groovyc] Compiling 7 source files to C:\Documents and Settings\Administrator\.grails\1.0.4\projects\hello\classes
12[native2ascii] Converting 11 files from E:\Groovy\projects\hello\grails-app\i18n to C:\Documents and Settings\Administrator\.grails\1.0.4\projects\hello\resources\grails-app\i18n
13 [copy] Copying 1 file to C:\Documents and Settings\Administrator\.grails\1.0.4\projects\hello\classes
14 [copy] Copying 1 file to C:\Documents and Settings\Administrator\.grails\1.0.4\projects\hello\resources
15 [copy] Copying 1 file to C:\Documents and Settings\Administrator\.grails\1.0.4\projects\hello
16Running Grails application..
172009-03-12 20:00:01.183::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
182009-03-12 20:00:01.402::INFO: jetty-6.1.12
192009-03-12 20:00:02.652::INFO: No Transaction manager found - if your webapp requires one, please configure one.
202009-03-12 20:00:02.308:/hello:INFO: Set web app root system property: 'hello-development-0.1' = [E:\Groovy\projects\hello\web-app]
212009-03-12 20:00:02.308:/hello:INFO: Initializing log4j from [file:C:\Documents and Settings\Administrator/.grails/1.0.4/projects/hello/resources/log4j.properties]
222009-03-12 20:00:02.340:/hello:INFO: Initializing Spring root WebApplicationContext
23[0] spring.GrailsWebApplicationContext Refreshing org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@396c7: display name [org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@396c7]; startup date [Thu Mar 12 20:00:05 CST 2009]; parent: org.springframework.web.context.support.XmlWebApplicationContext@1e7c609
24[0] spring.GrailsWebApplicationContext Bean factory for application context [org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@396c7]: org.springframework.beans.factory.support.DefaultListableBeanFactory@c4c05
252009-03-12 20:00:08.179:/hello:INFO: Initializing Spring FrameworkServlet 'grails'
262009-03-12 20:00:09.445::INFO: Started SelectChannelConnector@0.0.0.0:8080
27Server running. Browse to http://localhost:8080/hello
鍦板潃鏍忎腑錛岀涓涓猦ello涓洪」鐩悕錛岀浜宧ello涓烘帶鍒跺櫒鍚嶏紝index涓烘搷浣滃悕銆?br />
鏈鍩烘湰鐨勪竴涓叆闂ㄧ▼搴忓啓瀹屼簡(jiǎn)錛岄櫎浜?jiǎn)鎵嬪伐缂栧啓澶栧Q屾垜浠繕鍙互浣跨敤NetBeans浣滀負(fù)寮鍙慖DE錛屽ぇ澶х畝鍖栧紑鍙戞祦紼嬨傝嚦灝戜笉鐢ㄨ閭d箞澶氬懡浠や簡(jiǎn)鍝堬紒
]]>
涓夈佸皢GRAILS_HOME鍔犲叆鍒癙ATH涓紝%GRAILS_HOME%/bin
OK錛岀幇鍦ㄦ祴璇曚竴涓嬶紝鍛戒護(hù)琛屼笅杈撳叆grails錛屽鍥撅細(xì)
濂戒簡(jiǎn)錛屽噯澶囧伐浣滃氨緇紝璁╂垜浠紑濮嬩粙緇嶅嚑涓畝鍗曠殑鍛戒護(hù)鍚э紒
鍛戒護(hù)琛屼笅杈撳叆grails help錛屽厛鏉ョ湅鐪媑rails鐨勫熀鏈懡浠ゅ惂