07-热部署集成相关

184 阅读1分钟

07-热部署集成相关 在团队开发和管理过程中,热部署 热启动 能极大地提高开发效率、节省软件开发时间

spring boot官方给予了一个商业版本的推荐 JRebel

JRebel 在idea插件市场内,安装完之后即可实现热启动,但它的功能不止于此!

JRebel是一套JavaEE开发工具。JRebel允许开发团队在有限的时间内完成更多的任务修正更多的问题,发布更高质量的软件产品。 JRebel是收费软件,用户可以在JRebel官方站点下载30天的评估版本。

www.jrebel.com/products/jr…

除此之外,spring boot官方还提供了开发者工具以及热插拔的方法说明文档

docs.spring.io/spring-boot… docs.spring.io/spring-boot…

devtools 的属性定义 github.com/spring-proj…

但是对于一些静态素材,则可以排除监控

Note that certain resources, such as static assets and view templates, do not need to restart the application.

docs.spring.io/spring-boot…

注意 restart vs reload

7.5. Hot Swapping Since Spring Boot applications are just plain Java applications, JVM hot-swapping should work out of the box. JVM hot swapping is somewhat limited with the bytecode that it can replace. For a more complete solution, JRebel

can be used.

The spring-boot-devtools module also includes support for quick application restarts. See the Developer Tools section later in this chapter and the Hot swapping “How-to” for details.

docs.spring.io/spring-boot…