IntelliJ IDEA JRebel Maven Tomcat 实现热部署

Step1

pom.xml 中添加如下代码:

 <plugin>
                <groupId>org.zeroturnaround</groupId>
                <artifactId>jrebel-maven-plugin</artifactId>
                <version>1.1.5</version>
                <executions>
                    <execution>
                        <id>generate-rebel-xml</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

step2 添加 rebel.xml 文件

这里写图片描述 
勾选 
这里写图片描述 
生成了 rebel.xml 文件 
这里写图片描述

step3 配置运行

配置运行选项, 
这里写图片描述 
然后就运行 
这里写图片描述

step4 同步操作

这样还不能实现eclipse中那样的快速自动编译生效,需要自己手动编译一下修改的Java文件: 
crtl+F9 是编译单个文件 
ctrl+shift+F9 是编译整个项目 
当然 html 文件无需这样 ,直接刷新页面就可以了…

原文地址:https://www.cnblogs.com/soundcode/p/6519118.html