您的位置:首页 > 运维架构 > Tomcat

以SpringMVC框架为中心疯狂扩展-02、添加tomcat插件

2016-07-13 15:19 483 查看
1、在pom中添加 tomcat的插件

在tomcat的官网可以查看到tomcat插件的配置信息。

添加插件信息到pom中

<build>
<finalName>p2.customer</finalName>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<span style="white-space:pre">		</span><port>9090</port>
<span style="white-space:pre">		</span><path>/</path>
<span style="white-space:pre">		</span><uriEncoding>UTF-8</uriEncoding>
<span style="white-space:pre">		</span><finalName>p2</finalName>
<span style="white-space:pre">		</span><server>tomcat7</server>
<span style="white-space:pre">	</span></configuration>
</plugin>
</plugins>
</build>

2、配置maven的tomcat启动



在base directory中根据 browse file system选择项目所在的路径、在goals中输入tomcat7:run



3、点击Run

等待更新本地的maven库,如果本地有所需要的包就会很快。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: