Home > Java > JavaBase > Detailed explanation of Spring Boot hot deployment Devtools

Detailed explanation of Spring Boot hot deployment Devtools

Guanhui
Release: 2020-07-24 17:19:33
forward
2422 people have browsed it

Detailed explanation of Spring Boot hot deployment Devtools

1 pom.xml file

Note: The hot deployment function is available starting from spring-boot-1.3

<!--添加依赖-->
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-devtools</artifactId>
  <!-- optional=true,依赖不会传递,该项目依赖devtools;之后依赖myboot项目的项目如果想要使用devtools,需要重新引入 -->
  <optional>true</optional>
</dependency>
Copy after login

Note: Add spring-boot-maven-plugin to the project, which is mainly used in eclipse. There is no need to add this configuration 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>
Copy after login

2 Change the idea configuration

 1) “File” -> “Settings” -> “ Build,Execution,Deplyment" -> "Compiler", select "Build project automatically".

 2) Key combination: "Shift Ctrl Alt /", select "Registry", check "compiler.automake.allow.when.app.running".

3 Chrome disables cache

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

Recommended tutorial: "Java Tutorial"

The above is the detailed content of Detailed explanation of Spring Boot hot deployment Devtools. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template