使用 spring web 时候 web.xml 的配置

来源:互联网 发布:冰淇淋挖球器 知乎 编辑:程序博客网 时间:2024/04/28 09:59
<?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">        <!-- Spring配置 -->      <listener>          <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>      </listener>        <!-- 指定Spring Bean的配置文件所在目录。默认配置在WEB-INF目录下 -->      <context-param>          <param-name>contextConfigLocation</param-name>          <param-value>WEB-INF/applicationContext.xml</param-value>      </context-param>        <welcome-file-list>          <welcome-file>index.jsp</welcome-file>      </welcome-file-list>    </web-app> 

0 0
原创粉丝点击