SpringBoot项目热部署

10,687 阅读1分钟

IntelliJ IDEA开发工具

1.需要在pom.xml文件中加入以下依赖。

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

2.在File-->Setting-->Compiler下面,将Build project automatically前面的勾选框选上,然后点击Apply。

3.然后使用快捷键Ctrl+Shift+A,查找Registry,选择Registry...,将compiler.automake.allow.when.app.running选上即可。

4.这样修改了页面,不需要重启项目,在页面也可以看到修改后的效果。

IntelliJ IDEA新版本的开发工具,maven窗口没有显示的问题:

idea maven窗口消失,解决方案
菜单栏Help->Find Action(Ctrl+Shift+A),输入Maven。然点解Add Maven Projects,将你要添加的pom.xml文件添加进来就可以了。