gpt4 book ai didi

spring - Grails 4 热插拔/重新编译

转载 作者:行者123 更新时间:2023-12-02 13:50:20 24 4
gpt4 key购买 nike

我正在使用:Intellijgrails版本:4.0.3gorm.版本:7.0.4.RELEASE

我刚刚得到:Testcontroller.groovy 已更改,正在重新编译...

但我的代码不是热部署的。使用 Grails 3 一切正常。

我该怎么做才能热部署 Grails 4 和 Spring Boot 2 中的 Controller ?

最佳答案

您可以使用 spring-loaded(项目已闲置多年但仍然有效)或 JRebel 进行“热”重载。

启用:

构建.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

关于spring - Grails 4 热插拔/重新编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61361479/

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