我希望你能帮助我。
我最近将我们的 grails 项目从 2.1 版升级到 2.2.4 版,现在自动编译/重新加载已损坏 => 每次在 Controller/Services/Taglibs 中进行更改时,我都必须重新启动应用程序才能看到它们。
此线程中的控制台属性 Grails autocompile not in development environment不要为我工作。我也在谷歌上做了一些研究,但我找不到任何有帮助的东西。
谢谢你的帮助!
编辑:
感谢您到目前为止的帮助,我可以解决问题。我已将系统类路径更新为新 grails 版本的路径,现在它可以工作了:-)。这有点奇怪,因为在 Intellij Idea 中正确设置了 sdk。
最佳答案
如果您使用的是 IntelliJidea,请尝试使用:(在 IntelliJidea 11 和 12 上使用 grails 2.2.2 测试)
编辑 :Jar 版本案例也包括用于不同的 grails 版本。
grails -Dserver.port=8096 -javaagent:${GRAILS_HOME}/lib/org.springsource.springloaded/springloaded-core/jars/springloaded-core-1.1.x.jar -Xverify:none run-app
注意:其中 1.1.x 是 jar 的版本,对于 grails 2.2.2,它是 1.1.1,对于 2.2.4,它是 1.1.3
但是,如果您使用的是命令行,请尝试使用
grails -reloading run-app
没有任何“-D”系统属性重新加载应该可以正常工作。 (虽然没有测试)引用:http://jira.grails.org/browse/GRAILS-8951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
关于从 2.1 升级到 2.2.4 后 Grails 自动编译中断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18889945/