加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

grails(一)环境搭建

发布时间:2020-12-14 17:07:12 所属栏目:大数据 来源:网络整理
导读:grails(一)环境搭建 1. 安装 下载grails 首页 http://grails.org/ 下载页面 http://www.grails.org/Download 文件 grails-bin-1.0.3.zip 解开压缩得到grails-1.0.3文件夹,拷贝到tools下面 在系统的配置上加上: GRAILS_HOME = D:toolgrails-1.0.3 path中
grails(一)环境搭建 1. 安装 下载grails 首页 http://grails.org/ 下载页面 http://www.grails.org/Download 文件 grails-bin-1.0.3.zip 解开压缩得到grails-1.0.3文件夹,拷贝到tools下面 在系统的配置上加上: GRAILS_HOME = D:toolgrails-1.0.3 path中加入D:toolgrails-1.0.3bin; 在命令行中输入grails 得到如下欢迎信息证明安装成功 Welcome to Grails 1.0.3 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: D:toolgrails-1.0.3 No script name specified. Use 'grails help' for more info or 'grails interactive ' to enter interactive mode 下载 IntelliJ IDEA 首页 http://www.jetbrains.com/idea/ WINDOWS版本文件 http://www.jetbrains.com/idea/download/download_thanks.jsp?os=win 文件 idea-7.0.4.exe 安装后破解 然后安装groovy插件,点击Open Plugin Manager 在Available里面搜索 jetgroovy ,右键 download and install 2.新增项目 create project from scratch 选择grails Application 选择jdk路径 选择安装grails的路径 选中项目 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 Parameters里面输入 run-app 直接启动,访问 http://localhost:8080/easygrails 就可以访问到刚才的hellocontroller,看到hello,sillycat的页面了。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读