Vue-router deployment uses history deployment

Before packaging:

1. Change the mode in the router to history, and change base to the name of the deployed front-end project.

2. Modify the tomcat configuration and add a line in web.xml

<error-page>
	<error-code>404</error-code>  
	<location>/index.html</location>  
</error-page>

3. Drop the project and start the server under tomcat.

Guess you like

Origin blog.csdn.net/qq_29407683/article/details/105725970