一、设置
1、command + SHIFT + A --> 查找make project automatically --> 选中
1、command + SHIFT + A --> 查找make project automatically --> 选中
2、command + SHIFT + A --> 查找Registry --> 找到并勾选compiler.automake.allow.when.app.running
二、添加依赖
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-devtools</artifactId>
- <optional>true</optional>
- </dependency>
-
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <configuration>
- <fork>true</fork>
- </configuration>
- </plugin>
- </plugins>
- </build>