IDEA新建maven项目没有webapp目录 1、在项目上右键 》open module settings 2、在Modules模块中,增加web配置。 3、设置web根目录和web.xml文件所在位置。 4、结果如下图: