注意:这个功能只有在开发环境中使用,一旦项目上线在生产环境里这个功能必须关闭
第一步:Adding devtools to your project(向项目中添加devtools)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
第二步:Adding plugin to your pom.xml(在pom.xml中添加插件)
注意:将下面的内容粘贴到聚合父类总工程的pom.xml中
<build> <finalName>你自己的工程名字</finalName> //这一行可以省略 <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork>