web.xml中的welcome-file-list不起作用
web.xml
<welcome-file>redirect.jsp</welcome-file>
</welcome-file-list>
redirect.jsp
<%--
Views should be stored under the WEB-INF folder so that
they are not accessible except through controller process.
This JSP is here to provide a redirect to the dispatcher
servlet but should be the only JSP outside of WEB-INF.
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<jsp:forward page="/energy-rent/html/index.html"/>
spring-mvc.xml
<mvc:resources mapping="/redirect.jsp" location="/" />