spring配置问题

来源:互联网 发布:淘宝订餐 编辑:程序博客网 时间:2024/05/17 18:19

spring在web.xml中的配置:

注:版本如果3.0写成了2.5可能会出现加载不了bean的问题。

<?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"         version="3.0">    <display-name>wxadmin</display-name>    <!-- Springmybatis的配置文件 -->    <context-param>        <param-name>contextConfigLocation</param-name>        <param-value>classpath:applicationContext.xml</param-value>    </context-param>    <!-- Spring监听器 -->    <listener>        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>    </listener>
</web-app>

0 0