vue+springboot项目刷新页面报404 vue打包后每次刷新页面都会报404,就很烦, 是因为路由模式的问题,只需要将路由模式改为history,然后在vue的router的index.js文件中加入以下代码即可 const router = new VueRouter({ mode: 'history', base: process.env.BASE_URL, routes }) 添加代码后刷新后就不会报错了