【锋利工具系列】IDEA+jetty+jrebel+maven实现热部署

第一步:配置jetty maven插件

<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.16.v20140903</version>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<webApp><contextPath>/</contextPath></webApp>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>80</port>
<maxIdleTime>300000</maxIdleTime>
</connector>
</connectors>
</configuration>
</plugin>

第二步:设置启动命令。
1、如图
[img]http://dl2.iteye.com/upload/attachment/0102/3391/df5b7a7f-6b05-3ab2-8e86-f18ee0b85481.png[/img]
2、如图
[img]http://dl2.iteye.com/upload/attachment/0102/3401/8191f713-61df-3191-a1b0-62f631729c6f.jpg[/img]
3、点击debug按钮,控制台打出[INFO] Started Jetty Server
ok,至此jetty已经可以正常使用了。

第三步:安装jrebel IDEA插件
1、我是下载好,从本地安装的,
因为我的jrebel破解版的版本是5.6,所以我也对应下载5.6的插件。
地址:http://dl.zeroturnaround.com/idea/jr-ide-idea-5.6.0-idea12.zip
本地安装如图,选择你插件的位置,安装即可。
[img]http://dl2.iteye.com/upload/attachment/0102/3405/8832f642-8870-38bf-806c-fc2c611f2bbc.png[/img]
安装后需重启IDEA。
2、安装后会出现两个按钮,如图
[img]http://dl2.iteye.com/upload/attachment/0102/3411/069b112e-59e4-3f58-aa4a-1a68acb81636.jpg[/img]
3、进入到目录:
C:\Users\当前系统用户\.IntelliJIdea12\config\plugins\jr-ide-idea\lib\jrebel,用破解版的jrebel.jar替换掉当前目录下的该文件。
4、点击debug,会弹出许可认证,选择你的破解认证文件,点ok。
[img]http://dl2.iteye.com/upload/attachment/0102/3413/632a6273-09b2-31c8-b114-0e6d8ac12b30.png[/img]

ok,至此jrebel插件也安装好了。

现在,点击jrebel插件的debug按钮看看效果,哈哈,控制台打出了jrebel的认证信息等,
但是,出现错误FATAL ERROR in native method: processing of -javaagent failed

[img]http://dl2.iteye.com/upload/attachment/0102/3417/69e8dc12-9d15-3b92-bb4b-adabca48970b.png[/img]
别急,

[img]http://dl2.iteye.com/upload/attachment/0102/3421/f4510f40-f7ce-384d-9955-229f64ebe4f3.jpg[/img]
把use -javaagent这个勾上,再启动看看。
[img]http://dl2.iteye.com/upload/attachment/0102/3423/29e294c6-debf-3cbf-9c22-dc16ab80457b.png[/img]
ok,现在一切都可以正常使用了。

补充,当你的文件有改动时,还需要手动将改动文件编译到你指定目录下(ctrl+shift+f9或ctrl+f9),然后就可以看到你的修改成果了。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值