1.导入包坐标
- <dependency>
- <groupId>org.springframework.bootgroupId>
- <artifactId>spring-boot-devtoolsartifactId>
- <scope>runtimescope>
- <optional>trueoptional>
- dependency>
2.pom.xml添加piugins插件并打开开关
- <plugins>
- <plugin>
- <groupId>org.springframework.bootgroupId>
- <artifactId>spring-boot-maven-pluginartifactId>
- <version>2.2.2.RELEASEversion>
- <configuration>
- <fork>truefork>
- <addResources>trueaddResources>
- configuration>
- plugin>
- plugins>
3.设置idea自动编译
File ->Settings ->Build, Execution, DeploymentAdvanced Setttings -> Compiler
4.Advanced Setttings设置
File ->Settings ->Advanced Setttings
5.重启IDEA