spring mvc 基础知识

spring mvc 在web.xml中的配置:

  例子:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <servlet>
        <servlet-name>dispatcherServlet</servlet-name>
        <servlet-class>
            org.springframework.web.servlet.DispatcherServlet
        </servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>
                /WEB-INF/View_Config.xml,
                /WEB-INF/Hibernate_Config.xml,
                /WEB-INF/System_Config.xml,
                /WEB-INF/DocuStu_Config.xml,
                /WEB-INF/DocuTea_Config.xml,
                /WEB-INF/BookLibrary_Config.xml,
                /WEB-INF/SourceStu_Config.xml,
                /WEB-INF/employee_Config.xml
            </param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>dispatcherServlet</servlet-name>
        <url-pattern>*.htm</url-pattern>
    </servlet-mapping>
</web-app>

   详细见:http://www.cnblogs.com/superjt/p/3309255.html

 

posted on 2020-06-04 15:56  芝麻开花——节节高  阅读(66)  评论(0编辑  收藏  举报

导航