解决方法:把本地tomcat安装目录下webapp下的的ROOT文件夹配置到idea中即可,注意修改application context为 / 这里的application context是访问的虚拟目录