1.找到config>index.js 修改assetsPublicPath。

2.tomcat目录中的conf>server.xml 添加新端口

<Service name="Catalina2">
    <Connector port="8088" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8445" />
    <Connector port="8010" protocol="AJP/1.3" redirectPort="8445" />
    <Engine name="Catalina2" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.LockOutRealm"> 
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>
	  <Host name="localhost" appBase="webstatics" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">  
		<Context path="" docBase="demename" debug="0" reloadable="true" crossContext="true"/>
      </Host>
    </Engine>
  </Service>

3.tomcat根目录新建目录webstatics,把vue项目扔到里面。

4.启动tomca,访问设置的端口8088。

Logo

前往低代码交流专区

更多推荐