1.
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
2.
3.
4.
或
1.
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
2.
ctrl+F9
排除不想热部署的:
spring.devtools.restart.exclude=static/**,public/**
-------------------------------------------
报错:
Error:Maven Resources Compiler: Maven project configuration required for module 'spring-devtool' isn't available. Compilation of Maven projects is supported only if external build is started from an IDE.