springmvc配置静态资源访问-三种方式
来自:https://blog.csdn.net/m0_47010003/article/details/124577219
另外:
添加 tomcat servlet
web.xml
<!--在conf/web.xml中的DefaultServlet的定义--> <servlet> <servlet-name>default</servlet-name> <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <init-param> <param-name>listings</param-name> <param-value>false</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <!-- The mapping for the default servlet --> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>*.html</url-pattern> </servlet-mapping>