1. I used tomcat to run the packaged project. As soon as I refreshed the browser page, it jumped to 404, but set mode: 'hash', browse The server will not do this, but the URL is too ugly. Why? 2. My routing project is configured like this:
When you enter the address in your browser, it is parsed by Tomcat. It finds that there is no matching method or file under the current route of your server, so it naturally returns 404. You need to configure the server so that all routes starting with /PcsBrowser/ point to your Vue entry file.
When you enter the address in your browser, it is parsed by Tomcat. It finds that there is no matching method or file under the current route of your server, so it naturally returns 404. You need to configure the server so that all routes starting with /PcsBrowser/ point to your Vue entry file.
To play this mode well, you also need background configuration support
Reference: HTML5 History mode