Grails(2)Upgrade Groovy and Grails First Step

本文介绍了如何将Groovy升级到1.8.6版本及Grails升级到2.0.4版本的具体步骤,并通过创建一个简单的Hello World应用验证安装是否成功。此外,还提供了使用STS集成Grails插件的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Grails(2)Upgrade Groovy and Grails First Step

1. Upgrade groovy to 1.8.6
download the latest version here http://groovy.codehaus.org/Download
Unzip the file and add it to path
GROOVY_HOME=D:\tool\groovy-1.8.6
and path adding D:\tool\groovy-1.8.6\bin;

C:\Users\luohua>groovy -v
Groovy Version: 1.8.6 JVM: 1.7.0_04 Vendor: Oracle Corporation OS: Windows 7

2. Upgrade grails to 2.0.4
download the latest grails here http://www.grails.org/Download

Unzip the file and add it to path
GRAILS_HOME = D:\tool\grails-2.0.4
path adding D:\tool\grails-2.0.4\bin;

C:\Users\luohua>grails
This will download some jar packages, and this version 2.0.4, it is different from 1.x version.
C:\Users\luohua>grails -version
Grails version: 2.0.4

3. try one demo to verify my installation
>grails create-app hellosillycat
>cd hellosillycat
enter the interactive console
>grails
TAB to tip
grails>create-controller hello

Change the content of HelloController.groovy as follow:
package hellosillycat
class HelloController {
def index() {
render "Hello World!"
}
}

Right now, we have the project structure and we have the first action HelloController.groovy. Start the web contrainer:
grails>run-app

This command can exit the appliction server.
grails>exit

4. Eclipse Plugin
I will use STS and install Grails plugin. We can import the project we just create, and VMware vFabric Server will be the web container.


references:
http://sillycat.iteye.com/blog/1137079
http://sillycat.iteye.com/blog/562774
http://sillycat.iteye.com/blog/562775
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值