web等项目热部署热加载

tag:web web项目 项目 热部署 热加载

 

老是重新启动项目,尤其是大些的项目,很慢很烦人。如果能热部署,至少可以节约些时间~

 

#1 以前的项目用一个tomcat的热部署工具,但需要花钱买正版

 

#2 tomcat

现在有manager,可以重新加载某个项目。

配置:

$TOMCAT_HOME/conf/tomcat-users.xml

<tomcat-users>
<!--
  NOTE:  By default, no user is included in the "manager-gui" role required
  to operate the "/manager/html" web application.  If you wish to use this app,
  you must define such a user - the username and password are arbitrary.
-->
<!--
  NOTE:  The sample user and role entries below are wrapped in a comment
  and thus are ignored when reading this file. Do not forget to remove
  <!.. ..> that surrounds them.
-->

  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <role rolename="manager-gui"/>
  <role rolename="manager-script"/>
  <role rolename="manager-jmx"/>
  <role rolename="manager-status"/>
<!--
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="role1" password="tomcat" roles="role1"/>
-->
  <user username="myNameFantaxy" password="111222" roles="tomcat,role1,manager-gui,manager-script,manager-jmx,manager-status"/>

</tomcat-users>

 打开地址: http://localhost:8080/manager/

 

 

#3 jetty

如robbin所言,我是根本不部署。直接在我的Eclipse项目里面引入jetty的jar,然后自己写一个Main类启动jetty,换句话说就是把jetty嵌入到我的Eclipse项目里面来。

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值