1. Right-click on the project name in eclipse, select Properties, click Web Project Settings on the left in the pop-up interface, find the Context root option on the right, and change the value in Context root to /, the problem is solved.
2. Modify the tomcat server.xml file
<Context docBase="xxx" path="/" reloadable="true" source="org.eclipse.jst.jee.server:xxx"/></Host>