600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > Vue——项目打包部署到tomcat

Vue——项目打包部署到tomcat

时间:2021-11-15 00:21:25

相关推荐

Vue——项目打包部署到tomcat

1、修改vue项目config文件夹index.js文件

build: {index: path.resolve(__dirname, '../dist/index.html'),assetsRoot: path.resolve(__dirname, '../dist'),assetsSubDirectory: 'static',// 绝大多数我们使用"/" 这边使用lab 在tomcat webapps下新建lab目录assetsPublicPath: '/lab/',}

2、vue 项目进行打包

执行:npm run build

查看输出文件:dist 文件夹下生成这几个文件,里面的文件复制到/Users/wuxi/Documents/apache-tomcat-8.0.53/webapps/lab下

3、修改配置文件启动本地tomcat

mac安装tomcat:/wx19900503/article/details/72897798

修改 /Users/wuxi/Documents/apache-tomcat-8.0.53/conf/server.xml

<ConnectorconnectionTimeout="20000"port="8081"protocol="HTTP/1.1"redirectPort="8443"/>

端口改为8081 启动tomcat 查看成功

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。