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

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

问题描述

我最近将项目升级到grails 2.3.0。一切工作正常,除非我一直有问题,自动重新加载不工作,只要我改变我们的代码。这包括所有项目artefacts - 控制器,域,服务,gsps,css和javascript文件。

我的老版本的grails能够正常工作,并且每次创建时都会重新加载并重新编译



我知道这个问题很受欢迎,我已经搜索了Jira,Nabble,现在在这里好几天了,但是我没有发现能够解决我的问题我甚至试图在此主题中添加像Peter建议的引号 http://jira.grails。 org / browse / GRAILS-7936 以及此主题 Grails项目不自动重新加载没有帮助)。



目前,我们正在Macbook Pro上运行grails,并使用以下设置:


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


    任何帮助都将不胜感激。

    解决方案

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


    在Grails 2.3中,重载代理不再位于构建系统
    路径上,除非您将-reloading标志传递给grails命令:
    $ b grails -reloading run-app


    然而,你可以使用以下配置启用buildConfig:

      forkConfig = [maxMemory:1024,minMemory:64,debug:false, maxPerm:256 ] 
    grails.project.fork = [
    test:forkConfig,//为测试应用程序JVM配置设置
    run:forkConfig,//为运行应用程序JVM配置设置
    war:forkConfig,//配置运行时JVM的设置
    console:forkConfig //配置Swing控制台JVM的设置]

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


    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.

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

    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).

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

    • grails version 2.3.0
    • Java version "1.7.0_17" Java(TM) SE Runtime Environment (build 1.7.0_17-b02) Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
    • Running from terminal with Textmate as IDE

    Any help would be greatly appreciated.

    解决方案

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

    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

    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 ]
    

    More information : Forked Execution and the Reloading Agent

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

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