zoukankan      html  css  js  c++  java
  • maven+tomcat热部署

    1.首先修改tomcat安装目录下的conf文件夹中的tomcat-user.xml文件
      <role rolename="manager-gui"/>
      <role rolename="manager-script"/>
      <user username="tomcat" password="tomcat" roles="manager-gui,manager-script"/>

    2.重启tomcat后,在tomcat首页点击manager,输入上面配置的用户名密码后,进入到如下页面,表示配置的没有问题。

    3.  pom文件中添加如下插件

    <plugin>
      <groupId>org.apache.tomcat.maven</groupId>
      <artifactId>tomcat7-maven-plugin</artifactId>
      <version>2.2</version>
      <configuration>
      <port>8181</port>
      <path>/appName</path>
      <url>http://ip:端口/manager/text</url>
      <username>tomcat</username>
      <password>tomcat</password>
      </configuration>
    </plugin>

    4.使用maven命令进行部署。
    tomcat7:deploy(第一次)
    tomcat7:redeploy(重新部署)
    部署工程跳过测试:clean tomcat7:redeploy -DskipTests

    热部署成功

  • 相关阅读:
    深入分析String类型(一)
    创建泛型类
    XML数据的读取—数据库配置文件
    Config配置文件读写
    jQuery动画
    设置屏幕快捷键
    jQuery事件
    jQuery操作DOM
    Python 二进制文件网址
    Centos使用crontab自动定时备份mysql的脚本
  • 原文地址:https://www.cnblogs.com/red-evil/p/10057370.html
Copyright © 2011-2022 走看看