Only need to add in the Pom.xml file
1 <Build>2 <Finalname>Myssm</Finalname>3 <!--Specify the type of server to deploy -4 <Plugins>5 <!--<plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactid>tomcat6-maven-plugin </artifactId>6 <version>2.2</version> </plugin> -7 <plugin>8 <groupId>Org.apache.tomcat.maven</groupId>9 <Artifactid>Tomcat7-maven-plugin</Artifactid>Ten <version>2.2</version> One <Configuration> A <Port>8080</Port> - <Path>/myssm</Path> - <uriencoding>UTF-8</uriencoding> the <Server>Tomcat7</Server> - </Configuration> - <!--Run this container when you are packing - - <executions> + <Execution> - <Phase>Package</Phase> + <Goals> A <goal>Run</goal> at </Goals> - </Execution> - </executions> - </plugin> - </Plugins> - </Build>
After you debug the project, the package starts
MAVEN Project Hot deployment, no need to restart the Tomcat server after code modification