In the development process, it is possible to modify update is desired to modify, i.e. thermal loading, but spring-boot-devtools ineffective. This is mainly for two reasons.
A, spring-boot-maven-plugin plugin is not configured
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!-- 不配置热加载也没效果 -->
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
Second, the operation mode is java -jar target / xxx.jar, this approach is a production application, this will not work,
Execution of the program can choose to run maven plugin provides:
mvn spring-boot:run
Specify the configuration document:
mvn spring-boot:run -Dspring-boot.run.profiles=test
Third, in addition, IDEA is not automatically compiled, you can use shortcut keys to perform manually compile: Ctrl + F9, if it is to update a single file using the shortcut Ctrl + Shift + F9