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

    1.配置tomcat的界面访问账号和权限
    ./tomcat/conf目录下tomcat-users.xml添加

    这里是根据自己的需求添加的一个角色权限

    <role rolename="admin-gui"/>
    <role rolename="admin-script"/>
    <role rolename="manager-gui"/>
    <role rolename="manager-script"/>
    <role rolename="manager-jmx"/>
    <role rolename="manager-status"/>
    <user username="minsup" password="123456" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-script,admin-gui"/>
    

    2.配置pom.xml文件添加tomcat-maven-plugin插件

    		<plugin>
    			<groupId>org.codehaus.mojo</groupId>
    			<artifactId>tomcat-maven-plugin</artifactId>
    			<version>1.1</version>
    			<configuration>
    				<url>http://10.2.19.23:8080/manager/text</url><!--tomcat的管理访问地址-->
    				<server>tomcat</server> <!-- 此处的名字必须和setting.xml中配置的ID一致-->
    			</configuration>
    		</plugin>
    

    3.setting文件中添加tomcat的访问权限

      <server>
       <id>tomcat</id>
       <username>minsup</username><!--tomcat的账号-->
       <password>123456</password><!--tomcat的密码-->
      </server>
    

    4.执行mvn install tomcat:redeploy 自动部署tomcat

  • 相关阅读:
    PHP入门
    bootstrap框架
    jsp5 include forward param
    jsp4 Cookie
    网页定位导航
    jsp3 javabean
    Obsidian md安装闪退
    Excel 2016 Mac VBA 的变化 窗体消失
    Excel Mac 2016 调用 Applescript
    如何自学R
  • 原文地址:https://www.cnblogs.com/mengyu/p/3729439.html
Copyright © 2011-2022 走看看