gpt4 book ai didi

java - Grails 2.3.0 自动重新加载不起作用

转载 作者:IT老高 更新时间:2023-10-28 20:47:55 25 4
gpt4 key购买 nike

我最近将我们的项目升级到 grails 2.3.0。一切正常,除了我在更改代码时遇到自动重新加载无法正常工作的问题。这包括所有项目人工制品 - Controller 、域、服务、gsps、css 和 javascript 文件。

我的旧版本 grails 可以正常工作,每次我做出更改时都会重新加载和重新编译。

我知道这个问题很受欢迎,我已经搜索了 Jira、Nabble 和这里​​好几天了,但我发现没有一个能够解决我的问题(我什至尝试像 Peter 在这个线程中建议的那样添加引号http://jira.grails.org/browse/GRAILS-7936 和这个线程 Grails Project Not Auto Reloading 没有帮助)。

我目前正在使用以下设置在 Macbook pro 上运行 grails:

  • grails 2.3.0 版
  • Java 版本“1.7.0_17”Java(TM) SE 运行时环境 (build 1.7.0_17-b02)Java HotSpot(TM) 64 位服务器 VM(内部版本 23.7-b01,混合模式)
  • 使用 Textmate 作为 IDE 从终端运行

任何帮助将不胜感激。

最佳答案

似乎在 Grails 2.3 中重新加载不再是默认设置

In Grails 2.3 the reloading agent is no longer on the build system path unless you pass the -reloading flag to the grails command:

grails -reloading run-app

但是,您可以使用以下配置在 buildConfig 中启用 fork :

forkConfig = [maxMemory: 1024, minMemory: 64, debug: false, maxPerm: 256] 
grails.project.fork = [
test: forkConfig, // configure settings for the test-app JVM
run: forkConfig, // configure settings for the run-app JVM
war: forkConfig, // configure settings for the run-war JVM
console: forkConfig // configure settings for the Swing console JVM ]

更多信息:Forked Execution and the Reloading Agent

关于java - Grails 2.3.0 自动重新加载不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18882589/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com