我是靠谱客的博主 自然大门,这篇文章主要介绍maven项目增加web.xml,现在分享给大家,希望可以做个参考。

因为maven默认简单构建项目是sevlet3.0版本,web.xml不是必须的,这时候需要手动创建webapp/WEB-INF/web.xml,

web.xml可以从其他项目复制一个过来改改,或者pom.xml添加如下配置

<build>
    <pluginManagement>
        <plugins>
            <plugin>  
                <groupId>org.apache.maven.plugins</groupId>  
                <artifactId>maven-war-plugin</artifactId>  
                <configuration>  
                    <failOnMissingWebXml>false</failOnMissingWebXml>  
                </configuration>  
            </plugin> 
        </plugins>

    </pluginManagement>
</build>

https://blog.csdn.net/u010697681/article/details/50761184

最后

以上就是自然大门最近收集整理的关于maven项目增加web.xml的全部内容,更多相关maven项目增加web内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(120)

评论列表共有 0 条评论

立即
投稿
返回
顶部