基于IDEA的热加载。spring
在pom.xml中添加相应的依赖maven
<!-- 热加载--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> <!--<scope>true</scope>--> </dependency>
在pom.xml中添加相应的插件spring-boot
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork><!-- 若是没有该配置,热部署的devtools不生效 --> </configuration> </plugin>
设置IDEAspa
ctrl+shit+alt+/ 快捷键并点击Registry
mac快捷键 command+shit+option+/ 快捷键并点击Registry插件
找到以下图对应的Key并勾选code
按照如上所述步骤便可开启IDEA开发spring热加载功能。xml