关于pom文件中Tomcat插件的设置

  1. <build>  
  2.     <plugins>  
  3.         <!-- 配置Tomcat插件 ,用于启动项目 -->  
  4.         <plugin>  
  5.             <groupId>org.apache.tomcat.maven</groupId>  
  6.             <artifactId>tomcat7-maven-plugin</artifactId>  
  7.             <!--如果不设置,则默认为猫的自定义端口,项目路径为http://localhost:默认端口/项目名  -->  
  8.             <configuration>  
  9.             <!--如果端口号改为8081:那么访问的时候路径的端口就要写成8081,否则404  -->  
  10.                 <port>8080</port>  
  11.                 <!-- 如果设置为/,则项目了路径为http://localhost:端口号 /-->  
  12.                 <!-- 如果设置为/123,则项目了路径为http://localhost:端口号/123 -->  
  13.                 <path>/123</path>  
  14.             </configuration>  
  15.         </plugin>  
  16.     </plugins>  
  17.   </build>  

猜你喜欢

转载自blog.csdn.net/zxz9325/article/details/79167944
今日推荐