版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_39220472/article/details/82283950
项目想run时发现没有run on Server选项,也就是说不能把该项目放进tomcat服务进行启动
解决方法:
1.在pom.xml下查看有没有packaging设置,并把packaging设置为war.
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>comit</groupId>
<artifactId>messageBoard</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
</project>
再重新更新maven项目就有了