Gradle连续编译支持SpringBoot吗? [英] Does gradle continuous build support SpringBoot?

查看:261
本文介绍了Gradle连续编译支持SpringBoot吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试用 -t 标志运行 build 时:

When I try to run build with gradle with the -t flag:

./gradlew clean build -x test -t

我得到提示行:

I get prompt line:


等待输入任务文件的更改...(ctrl-d退出)

Waiting for changes to input files of tasks... (ctrl-d to exit)

但是当我用 bootRun 命令尝试它时,它不起作用/出现:

but when I try it with bootRun command it doesn't work/appear:

./gradlew clean bootRun -t

它是否适用于Spring Boot? (我知道春天开发工具插件 - 1.3还没有发布)

Does it work with Spring Boot? (I know about Spring dev tools plugin - 1.3 is not released yet)

推荐答案

这取决于Spring Boot应用程序的性质。如果你的应用程序通常运行,然后退出,然后连续构建将工作。但是,如果您的应用程序通常无限期地保持活动状态,例如因为它是处理HTTP请求的Web应用程序,那么它将无法工作。在后一种情况下, bootRun 任务永远不会完成,所以Gradle不知道是时候开始监视更改了。

It depends on the nature of your Spring Boot application. If you app typically runs and then exits then continuous build will work. However if your app typically stays alive indefinitely, for example because it's a web app that handles HTTP requests, then it won't work. In the latter case the bootRun task never completes so Gradle doesn't know that it's time to start watching for changes.

这篇关于Gradle连续编译支持SpringBoot吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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