vue項目如何部署tomcat以及刷新404問題

1.更改config下的index.js文件裏的assetsPublicPath 將‘.’改爲‘./’ 2.路由配置 加上 mode:‘history’, base: ‘/你的項目名/’, 3.將 npm run bulid 打包好的 dist文件放到 webapps 目錄下 此時的訪問路徑爲 http://ip:端口/dist 能訪問成功,但可能刷新 404 4.在上傳到tomcat 項目的根目
相關文章
相關標籤/搜索