Springboot implements hot deployment in idea

1. Introduce hot deployment devtools dependencies in pom.xml

<dependency>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-devtools</artifactId>
     <optional>true</optional>
</dependency>

2. Add the following plugin in pom.xm as follows:

<configuration>
     <fork>true</fork>
</configuration>

 

3. After editing the pom.xml file, you need to set two places

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

  2) Shortcut key: "Shift+Ctrl+Alt+/", select "Registry", check "compiler.automake.allow.when.app.running"

Guess you like

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