Grails 2.3.0 自动重新加载不起作用 [英] Grails 2.3.0 Auto-reloading not working

查看:27
本文介绍了Grails 2.3.0 自动重新加载不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I recently upgrade our project to grails 2.3.0. Everything works fine except I've been having problems with auto-reload not working whenever I make changes to our code. This include all projects artefacts - controllers, domain, services, gsps, css and javascript files.

我的旧版本 grails 可以正常工作,并且每次进行更改时都会重新加载和重新编译.

My older versions of grails work correctly and reloads and recompile every time I make a change.

我知道这个问题很受欢迎,我已经搜索了 Jira、Nabble 和这里​​好几天了,但我发现的所有内容都无法解决我的问题(我什至尝试添加像 Peter 在此线程中建议的引号http://jira.grails.org/browse/GRAILS-7936 还有这个线程 Grails 项目不自动重新加载 没有帮助).

I know this question is popular and I have searched Jira, Nabble and here for days now but none of what I have found have been able to solve my problem (I've even tried to add quotes like Peter suggested in this thread http://jira.grails.org/browse/GRAILS-7936 and also this thread Grails Project Not Auto Reloading did not help).

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

Am currently running grails on a Macbook pro with the following settings:

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

任何帮助将不胜感激.

推荐答案

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

It seems that in Grails 2.3 the reloading is no longer the default

在 Grails 2.3 中,重新加载代理不再在构建系统上除非您将 -reloading 标志传递给 grails 命令:

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

grails -reloading run-app

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

However, you can enable forking in your buildConfig using the following configuration:

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 ]

更多信息:分叉执行和重新加载代理

这篇关于Grails 2.3.0 自动重新加载不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆