thinking

one platform thousands thinking

Myeclipse中web.xml中找不到applicationContext.xml

在web.xml中加入这些配置

<context-param>
    <param-name>contextConfigLocation </param-name>
    <param-value>/WEB-INF/classes/applicationContext.xml </param-value>
</context-param>

问题主要由于加载spring的默认配置文件位置一般是在/WEB-INF/下找applicationContext.xml文件。而 Myeclipse文件自动生成的applicationContext文件是放在/WEB-INF/classes /applicationContext.xml。所以在默认加载中是找不到applicationContext.xml文件的,必须加入上面配置。

posted on 2009-05-26 16:27 lau 阅读(1934) 评论(0)  编辑  收藏 所属分类: J2EE


只有注册用户登录后才能发表评论。


网站导航: