Back

Grails 基础用法( Grails basics for newbies )

发布时间: 2012-09-04 02:41:00

1. 安装:  需要下载JDK, GRAILS等文件并设置以下变量: ( setup:  download related files and set the variables )
   1.1  JAVA_HOME
   1.2  GRAILS_HOME
   1.3  PATH

2. 设置代理服务器:   ( set the proxy )

    $ grails add-proxy  –host= –port=
    e.g.   $ grails add-proxy client –host=proxy –port=3128 
    Switching to the setting involves only
    $ grails set-proxy client
    to enable the proxy setting, and
    $ grails clear-proxy

3. 设置代理服务器的第二种方法: ( approach 2. set the proxy)

/ * EDIT this file:  grails-app/conf/BuildConfig.groovy   */ 
 System.properties.putAll([
   "http.proxyHost": "wwwgate0-ch.mot.com",
   "http.proxyPort": "1080",
 ])

4. 运行:  (run with another port)
 $ grails -Dserver.port=8081 run-app

Back