idea+spring-boot+devtools热部署

 

idea+spring-boot+devtools热部署

标签: spring-boot
 分类:
maven dependencies增加
[html] view plain copy
 
  1. <dependency>  
  2.     <groupId>org.springframework.boot</groupId>  
  3.     <artifactId>spring-boot-devtools</artifactId>  
  4.     <optional>true</optional>  
  5. </dependency>  

project增加
[html] view plain copy
 
  1. <build>  
  2.     <plugins>  
  3.         <plugin>  
  4.             <groupId>org.springframework.boot</groupId>  
  5.             <artifactId>spring-boot-maven-plugin</artifactId>  
  6.             <configuration>  
  7.             <!--fork :  如果没有该项配置,肯呢个devtools不会起作用,即应用不会restart -->  
  8.             <span style="white-space:pre">  </span><fork>true</fork>  
  9.             </configuration>  
  10.         </plugin>  
  11.     </plugins>  
  12. </build>  

idea设置

ctrl+shift+alt+/

重启项目即可。
posted @ 2017-07-14 16:07  lupeng2010  阅读(258)  评论(0编辑  收藏  举报