1. maven 加入以下依赖

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>

2. 作用

类或配置修改后,无需重新启动程序,devtools 会利用 restart 技术让改动快速生效,只需在IDEA 上方工具栏里找到

Build -> Rebuild Project (单个类的改动) ,多个类的改动则选择 Build Module 项针对整个模块。

减短了修改后需要再重新启动的时间。

版权属于:it小离

本文链接: https://www.itxiaoli.cn/archives/devtools.html

版权声明:本站文章采用 署名-非商业性使用-相同方式共享 4.0

最后修改:2022 年 04 月 16 日 08 : 07 PM
如果觉得我的文章对你有用,请随意赞赏