Grails 4热插拔/重新编译 [英] Grails 4 hot swap / recompile

查看:161
本文介绍了Grails 4热插拔/重新编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用: 智能 grails版本:4.0.3 gorm.version:7.0.4.发布

Im using: Intellij grailsVersion: 4.0.3 gorm.version: 7.0.4.RELEASE

我得到: Testcontroller.groovy changed, recompiling...

但是我的代码没有被热部署. 使用Grails 3,一切正常.

But my code isn't hot deployed. With Grails 3 everything worked fine.

我该怎么做才能使Grails 4和Spring Boot 2中的控制器得到热部署?

What can I do so that the Controllers in Grails 4 and Spring Boot 2 get hot deployed?

推荐答案

您可以使用spring-loaded(项目已经闲置了多年,但仍然可以正常工作)或JRebel进行热"重新加载.

You may use spring-loaded (project has been idle for years but still works) or JRebel for "hot" reloads.

要启用:

build.gradle

build.gradle

dependencies {
    // Remove dev-tools from classpath
    // developmentOnly("org.springframework.boot:spring-boot-devtools") 
    agent "org.springframework:springloaded:1.2.8.RELEASE"
    // (Optional) Native OSX file watcher
    runtimeOnly "io.methvin:directory-watcher:0.9.6"
    //...
}

请参阅: https://github.com/grails/grails-core/pull /11441

这篇关于Grails 4热插拔/重新编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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