zoukankan      html  css  js  c++  java
  • 【】maven 配置启动tomcat版本,修改默认的6.x.x版本

      <build>
           <plugins>    
              <!-- 配置Tomcat插件 ,用于启动项目 -->
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <!--如果不设置,则默认为猫的自定义端口,项目路径为http://localhost:默认端口/项目名  -->
                <configuration>
                <!--如果端口号改为8088:那么访问的时候路径的端口就要写成8088  -->
                    <port>8088</port>
                    <!-- 如果设置为/,则项目了路径为http://localhost:端口号 /-->
                    <!-- 如果设置为/lw,则项目了路径为http://localhost:端口号/lw -->
                    <path>/</path>
                </configuration>
            </plugin>      
          </plugins>
      </build> 

    使用此插件后,maven build 时的命令为:tomcat7:run 此时你会发现启动的tomcat版本为7.x.x 而不是默认的6.x.x了

  • 相关阅读:
    Tree MapByFold
    Tree DepthByFold
    Tree SizeByFold
    Tree MaximumByFold
    Tree Fold
    Tree Map
    Tree Depth
    Tree Maximum
    Tree Size
    Tree
  • 原文地址:https://www.cnblogs.com/oldwei/p/9788591.html
Copyright © 2011-2022 走看看