welcome-file-list 与SpringMvc 的 DispatcherServlet

时间:2021-11-15 10:57:44
【文件属性】:
文件名称:welcome-file-list 与SpringMvc 的 DispatcherServlet
文件大小:119KB
文件格式:ZIP
更新时间:2021-11-15 10:57:44
springMvc 在SpringMVC中 所有的请求都由dispatcherServlet处理(url-pattern配置的是/),当配置文件中有对静态资源的处理   时候  ,先匹配 welcome-file-list 中的文件,依次查找,找到了就 返回,如果没有找到就继续匹配到controller 例如附件例子,webapp下有test.html 和index.html两个文件,访问仅仅输入 工程名称 ,首先会返回test.html .如果此文件不存在 则返回index.html,如果都不存在则 进入controller
【文件预览】:
ssm
----.project(1KB)
----pom.xml(5KB)
----target()
--------test-classes()
--------maven-status()
--------m2e-wtp()
--------classes()
----.settings()
--------org.eclipse.wst.common.project.facet.core.prefs.xml(321B)
--------.jsdtscope(639B)
--------org.eclipse.core.resources.prefs(86B)
--------org.eclipse.wst.common.component(650B)
--------org.eclipse.wst.validation.prefs(50B)
--------org.eclipse.jdt.core.prefs(7KB)
--------org.eclipse.wst.common.project.facet.core.xml(346B)
--------org.eclipse.wst.jsdt.ui.superType.container(49B)
--------org.eclipse.m2e.core.prefs(90B)
--------org.eclipse.wst.jsdt.ui.superType.name(6B)
----src()
--------test()
--------main()
----.classpath(1KB)

网友评论