`

contextConfigLocation加载

阅读更多
<context-param>
	<param-name>contextConfigLocation</param-name>
	<param-value>
		classpath:applicationContext.xml
	</param-value>
</context-param>

只加载类路径下的applicationContext.xml文件,不包括子目录中的文件

 

 

<context-param>
	<param-name>contextConfigLocation</param-name>
	<param-value>
		classpath:applicationContext-*.xml
	</param-value>
</context-param>

加载类路径下所有以applicationContext-打头的文件xml文件,不包括子目录中的文件

 

 

<context-param>
	<param-name>contextConfigLocation</param-name>
	<param-value>
		classpath*:applicationContext-*.xml
	</param-value>
</context-param>

 

 

加载类路径下所有以applicationContext-打头的文件xml文件,包括子目录中以applicationContext-打头的文件xml文件 

分享到:
评论

相关推荐

    web.xml中如何设置配置文件的加载路径实例详解

    web.xml中如何设置配置文件的加载路径实例详解 web应用程序通过Tomcat等容器启动时,会首先加载web.xml文件,通常我们工程中的各种... &lt;param&gt;contextConfigLocation &lt;param&gt;classpath:config/XXXXXXX.xml &lt;/para

    MyContextLoaderPlugIn.jar

    稍微修改后在struts-config.xml中使用MyContextLoaderPlugIn.jar包中ContextLoaderPlugIn.class就可以解决延迟加载的问题 在 struts-config.xml中写上 className="org.springframework.web.struts....

    Spring.html

    --全局初始化参数--&gt; &lt;context-param&gt; &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-value&gt;classpath:applicationContext.xml&lt;/param-value&gt; 4.在Servlet中使用WebApplicationContextUtils获取容器...

    CXF WebService整合Spring示例工程代码demo

    -- 设置Spring容器加载配置文件路径 --&gt; &lt;param-name&gt;contextConfigLocation &lt;param-value&gt;classpath*:applicationContext-server.xml &lt;listener-class&gt;org.springframework.web.util....

    springweb3.0MVC注解(附实例)

    &lt;param-name&gt;contextConfigLocation &lt;param-value&gt;classpath:applicationContext.xml &lt;!-- Spring 容器启动监听器 --&gt; org.springframework.web.context.ContextLoaderListener &lt;/listener&gt; &lt;!-- ...

    Spring+mybatis整合实例应用

    项目结构图(Spring3.0.2+mybatis3.0.4)应用数据库对应的实体类数据Dao接口在config目录下...节点配置contextConfigLocation属性是为了让ContextLoaderListener找到Spring上下文的位置并加载它,如果不指定contextConfig

    OA项目SSH整合框架

    &lt;param-name&gt;contextConfigLocation &lt;param-value&gt;/WEB-INF/classes/applicationContext*.xml 2,在struts-config.xml中配置controller(Spring Reference 15.4.1.1. DelegatingRequestProcessor) &lt;!--...

    基于EXT SSI的简单树实现

    动态加载加右键菜单。 希望拿到可以跑起来看看效果的,需要按以下步骤做。 1 安装oracle,这个例子只做了oracle版本,如果需要,后期可以加上mysql版本,呵呵。 2 运行建用户及表空间的脚本。db_desc_ddl.sql. 3 ...

    cms后台管理

    &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;!----&gt; &lt;param-value&gt; /WEB-INF/config/application-context.xml /WEB-INF/config/cache-context.xml /WEB-INF/config/captcha-context.xml /WEB-INF/...

    ssh(structs,spring,hibernate)框架中的上传下载

    这是Hibernate3引入的新特性,对于包含重量级大数据的表字段,这种抽取方式提高了对大字段操作的灵活性,否则加载Tfile对象的结果集时如果总是返回fileContent,这种批量的数据抽取将可以引起数据库的"洪泛效应"。...

Global site tag (gtag.js) - Google Analytics