Spring MVC 配置 web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns="http://java.sun.com/xml/ns/javaee"
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"id="WebApp_ID" version="3.0">
   <servlet>
      <servlet-name>dispatche</servlet-name>
      <servlet-class>
         org.springframework.web.servlet.DispatcherServlet
      </servlet-class>
      <init-param>
         <param-name>contextConfigLoaction</param-name>
         <param-value>SpringMvc.xml</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
      <servlet-name>dispatche</servlet-name>
      <url-pattern>/*</url-pattern>
   </servlet-mapping>
   <error-page>
      <location>/WEB-INF/view/error.jsp</location>
   </error-page>
 

你可能感兴趣的:(Spring MVC 配置 web.xml)