grails环境搭建

grails环境搭建

 

 

1. 安装

下载grails

下载页面

http://www.grails.org/Download

文件grails-bin-1.0.3.zip

 

解开压缩得到grails-1.0.3文件夹

环境变量:

GRAILS_HOME = D:/tool/grails-1.0.3

path中加入D:/tool/grails-1.0.3/bin;

 

然后安装groovy插件,点击Open Plugin Manager

在Available里面搜索 jetgroovy ,右键 download and install

 

2.新增项目

create project from scratch

选择grails Application

选择安装grails的路径 D:/tool/grails-1.0.3/bin;

 

选中项目

new----->grails------>grails controller

输入hello,选择grails-app/controllers目录,会在目录中生成HelloController.groovy文件

在文件中输入

def index = {

render "hello,sillycat!"

}

 

在IDE的工具栏的Window---->Tool Windows----->Grails,打开运行的log窗口

 

Edit Configration里面增加一个easygrails,在Grails Script Parameters里面输入 run-app

 

直接启动,访问

http://IP:8080/工程名 -- 就可以访问到刚才的hellocontroller,看到hello,sillycat的页面了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值