Grails on Google App Engine
- groovy-1.6.3
http://groovy.codehaus.org/Download - grails-1.1.1
http://www.grails.org/Download - grails-app-engine-0.8.3 plugin
http://grails.org/plugin/app-engine
2. Install
- 设置系统环境变量:
GROOVY_HOME
GRAILS_HOME
Path: %GROOVY_HOME%\bin;%GRAILS_HOME%\bin
3.Create App
- 创建应用
grails create-app hook-hub
- 更改配置
在renli-resource/grails-app/conf/Config.groovy中添加如下行:google.appengine.application="hook-hub" - 安装AppEngine plugin
cd hook-hub
grails uninstall-plugin hibernate
grails install-plugin app-engine - 运行AppEngine
grails create-domain-class com.vickcy.Book grails install-plugin hibernategrails generate-all com.vickcy.Bookgrails uninstall-plugin hibernate - Delete : target/war/WEB-INF/datastore-indexes.xml
- 运行AppEnginegrails app-engine run
- 向GAE部署应用* 部署时应用名必须与注册的GAE应用名一致
grails set-version 1
grails app-engine package
%APPENGINE_HOME%/bin/appcfg.cmd update target/war
4.Develop Environment
- Eclipse3.4 plugin
・Google App Engine plugin
- update site: http://dl.google.com/eclipse/plugin/3.4
・TestNG plugin - Groovy plugin 的前提
- update site: http://beust.com/eclipse
・Groovy plugin
- update site: http://dist.groovy.codehaus.org/distributions/update/
- Eclipse Project Setting
Project -> Properties -> Java Build Path -> Libraries -> Edit ->Variable -> New
Name: GRAILS_HOME
Path: Grails根目录
謝謝你這篇介紹。
回复删除請問,我跟著你的步驟可以成功
grails create-domain-class com.vickcy.Book
grails install-plugin hibernate
grails generate-all com.vickcy.Book
grails uninstall-plugin hibernate
可是接著我想再creade一個domain卻不能成功連到新的
grails create-domain-class Game
grails install-plugin hibernate
grails generate-all Game
grails uninstall-plugin hibernate
我就連不到Game,會有此error
Error 500: javax.jdo.JDOFatalUserException: No meta data for Game. Perhaps you need to run the enhancer on this class? NestedThrowables: org.datanucleus.exceptions.NucleusUserException: No meta data for Game. Perhaps you need to run the enhancer on this class?
Servlet: grails
URI: /grails/game/list.dispatch
Exception Message: No meta data for Game. Perhaps you need to run the enhancer on this class?
Caused by: javax.jdo.JDOFatalUserException: No meta data for Game. Perhaps you need to run the enhancer on this class? NestedThrowables: org.datanucleus.exceptions.NucleusUserException: No meta data for Game. Perhaps you need to run the enhancer on this class?
Class: GameController
At Line: [14]
請問你遇過這問題嗎?thanks
此评论已被作者删除。
回复删除sorry, 後來試又可以了。不知道是不是瀏覽器有什麼cache住,我按ctrl+F5 reload後就ok
回复删除aa
回复删除挺好的
回复删除en
删除