参考:https://blog.csdn.net/weixin_45089791/article/details/99067243
- 首先在pom.xml中增加插件依赖
<build> <plugins> <!-- jdk版本插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> <configuration> <source>1.9</source> <target>1.9</target> <encoding>UTF-8</encoding> <showWarnings>true</showWarnings> </configuration> </plugin> <!-- tomcat7插件 --> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.1</version> <configuration> <port>8080</port> <path>/ss1</path> <server>tomcat7</server> </configuration> </plugin> </plugins> </build>
- 自己添加
- 添加maven
增加tomcat7:run
结束,点赞吧!