Vue-router uses history mode, and the background is tomcat,. How to configure the background?

vue-router uses history mode, and the backend is tomcat,. How to configure the backend so that you can access url directly without reporting 404 requests? Apache and nginx are all found on the Internet. Ask for help.


refer to this

<display-name>webapp</display-name>
  <description>
     webapp
  </description>
  <error-page>  
   <error-code>404</error-code>  
   <location>/</location>  
</error-page> 
Menu