2015-09-09 26 views
2

我有一个项目,将运行良好与mvn spring-boot:run,我希望在编译后自动热插拔的能力。我设置依赖项如下:如何让SpringLoaded在IntelliJ(或命令行)中使用Maven?

 <plugin> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-maven-plugin</artifactId> 
      <version>1.2.5.RELEASE</version> 
      <dependencies> 
       <dependency> 
        <groupId>org.springframework</groupId> 
        <artifactId>springloaded</artifactId> 
        <version>1.2.4.RELEASE</version> 
       </dependency> 
      </dependencies> 
     </plugin> 

但是,我没有看到响应重新编译的更改。是更需要的东西?

回答

0

只有当你更新你的类时,弹簧加载才会热插拔,即你构建项目,它不会为你重新编译。

在intellij的情况下,您需要按Ctrl + F9(或Mac上的等价物)或启用“自动生成项目”以在保存文件时自动编译您的代码。

相关问题