使用Idea创建的maven web项目,运行部署时并没有将js.css等打包,导致无法访问404 在webapp下新建css,js文件夹存放css,js文件,在部署运行时并没有将它们打包到target目录,导致无法访问,这是idea的一个bug(2018和2019版本是这样),需要这样设置 File->Settings->Build,Execution,Deployment->Build Tools->Maven->Importing 取消 “Store generated project files externally” ,