1.添加pom依赖
<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>
2.代码修改后,在项目上点击“Build Module xxxx”
原文地址:https://blog.51cto.com/suyanzhu/2389665
时间: 2024-11-08 11:39:54