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>