基于IDEA配置的pom.xml的方式给web添加tomcat,并运行。
具体实现如下:现在pom.xml文件中添加如下配置
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>/store</path>
<port>80</port>
</configuration>
</plugin>
点击Run/Debug Configurations 下的”+“号,选择maven
Command line(添加后面的话):clean tomcat7:run
然后点击Apply和Ok
进行如下操作后,会出现下面的图表识:
表示添加成功。