解决方法:
web.xml 中
<servlet> <servlet-name>dispatch</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>3</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dispatch</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping>
<url-pattern>/*</url-pattern> 改为
<url-pattern>/</url-pattern> 即可
时间: 2024-10-29 05:16:12