Spring-boot-devtools hot deployment method in Idea

1 pom.xml file

Note : The hot deployment function has been available since spring-boot-1.3

<!--Add dependency-->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <!-- optional=true, the dependency will not be passed, the project depends on devtools; if the project that depends on the myboot project wants to use devtools, it needs to be re-introduced -->
    <optional>true</optional>
</dependency>

Note : The spring-boot-maven-plugin is added to the project, which is mainly used in eclipse. This configuration does not need to be added to the idea.

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <fork>true</fork>
            </configuration>
        </plugin>
    </plugins>
</build>

2 Change the idea configuration  

1) “File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,选中打勾 
“Build project automatically” 。

2)组合键:“Shift+Ctrl+Alt+/”,选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running” 。

Chrome disable cache

  F12 or "Ctrl+Shift+I", open the developer tools, select "Disable Cache(while DevTools is open)" under the "Network" tab 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325113858&siteId=291194637