Springboot Web projects, every time you modify a Java file or a resource, you have to restart the project, so that wasted a lot of time, the implementation of the hot deployment, after each modification, will automatically restart
First step: Introduce hot-loaded plug-ins, Springboot 1.3 started
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId> spring-boot-devtools</artifactid>
<optional>true</optional>
</dependency>
Add Spring-boot-maven-plugin in Project, primarily in eclipse, idea does not need to add this configuration, Springboot project, should have this configuration, add the contents.
<build>
<plugins>
<plugin>
<groupid>org.springframework.boot</groupid >
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork >true</fork>
</configuration>
</plugin>
</plugins>
</build >
Part II: Idea settings (version 14)
1. Click: File, Settings, Build, execution,deplment
Then remember Apply,ok.
2, Combination key: shift+alt+ctrl+/, select "Registry", enter, find "complier.automake.allow.when.app.running"
Attention:
Because my idea is version 14, and some 15 versions or higher in compiler are like this:
, and then the shortcut key is CTRL + Shift +a, just find complier.automake.allow.when.app.running, click to tick.
Part III: If you use the same browser as mine, then disable the cache
Press F12 (more tools--developer tools) to find the network and tick disable Cache.
The pro-test is effective.
Also, if it is eclipse, add it directly to the Pom.xml file:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId> spring-boot-devtools</artifactid>
<optional>true</optional>
</dependency>
Can be, pro-test effective
The above article reproduced from http://www.jianshu.com/p/9d87de712279