tomcat對熱部署的支持不是很好,在添加方法,類,以及資源文件的時候經常須要重啓服務,像我在公司裏面的一個服務起來都要一到五分鐘,很是浪費時間.jrebel是第三方作的熱部署的工具,很是有用.下面就是在eclipse上面如何使用jrebel插件.web
1.經過eclipse install 下載jrebel eclipse插件
地址:http://www.zeroturnaround.com/update-site/
在獲取插件信息後選擇安裝JRebel(要取消JRebel m2eclipse Integration,不然沒法正常安裝)
2.安裝完成以後重啓eclipse,配置須要使用jrebel插件的項目和server. 順便配置下jrebel打印出日誌
3.插件會在選中的項目下自動生成rebel.xml .這個rebel.xml不能直接用,須要修改一下spring
<classpath>
<!-- 這裏是eclipse生成的class地址-->
<dir name="/home/liubin/workspace/tz/tops-front/tops-front-purchaser/bin">
</dir>
</classpath>
<web>
<link target="/">
<!-- 這裏是項目資源文件的地址-->
<dir name="/home/liubin/workspace/tz/tops-front/tops-front-purchaser/src/main/webapp">
</dir>
</link>
</web>
4.直接啓動項目便可
5.通過測試 添加方法,類,資源文件,以及使用spring的註解等都能當即生效.tomcat
6.關於破解jrebel你們能夠去網上查.app