Spring MVC DispatcherServlet Configuration
This\sXML\sconfiguration\ssets\sup\sthe\sDispatcherServlet\sin\sa\sSpring\sMVC\sapplication.\n\nThe\s\<servlet\>\selement\sdefines\sa\sservlet\scalled\s"dispatcherServlet"\swith\sthe\sclass\sorg.springframework.web.servlet.DispatcherServlet.\n\nThe\s\<init-param\>\selement\sspecifies\san\sinitilization\sparameter\scalled\s"contextConfigLocation"\swith\sthe\svalue\s"classpath:spring.xml".\sThis\sparameter\sis\sused\sto\sspecify\sthe\slocation\sof\sthe\sSpring\sapplication\scontext\sconfiguration\sfile.\n\nThe\s\<servlet-mapping\>\selement\smaps\sthe\s"dispatcherServlet"\sservlet\sto\shandle\sall\srequests\swith\sthe\sURL\spattern\s"/".\sThis\smeans\sthat\sany\srequest\sto\sthe\sapplication\swill\sbe\shandled\sby\sthe\sDispatcherServlet.
原文地址: https://www.cveoy.top/t/topic/qyC0 著作权归作者所有。请勿转载和采集!