maven项目中添加Tomcat启动插件

在pom.xml文件中添加如下配置:

<!-- 配置tomcat插件,pom.xml里配置 -->
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <configuration>
                <!—启动项目的端口号-->
                <port>8088</port>
                   <!—访问IP+端口号可以访问项目,不需要加项目名-->
                <path>/</path>
            </configuration>
        </plugin>
    </plugins>
</build>    

 

posted @ 2018-04-13 07:10  admin_jh  阅读(421)  评论(0编辑  收藏  举报