`
c_fanatic
  • 浏览: 64249 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

在web.xml中通过contextConfigLocation配置spring

阅读更多
如何在web.xml中配置contextConfigLocation的参数,即怎么来配置在classpath中的xml文件:

<context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath*:conf/spring/applicationContext_core*.xml,
            classpath*:conf/spring/applicationContext_dict*.xml,
            classpath*:conf/spring/applicationContext_hibernate.xml,
            classpath*:conf/spring/applicationContext_staff*.xml,
            classpath*:conf/spring/applicationContext_security.xml
            classpath*:conf/spring/applicationContext_modules*.xml
            classpath*:conf/spring/applicationContext_cti*.xml
            classpath*:conf/spring/applicationContext_apm*.xml
        </param-value>
</context-param>

From: http://gwj41.iteye.com/blog/538578
分享到:
评论

相关推荐

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

    web应用程序通过Tomcat等容器启动时,会首先加载web.xml文件,通常我们工程中的各种配置文件,如日志、数据库、spring的文件等都在此时被加载,下面是两种常用的配置文件加载路径,即配置文件可以放到 SRC目录下或者...

    JAVA web.xml配置详解

    &lt;param-value&gt;/WEB-INF/spring-config.xml &lt;!-- 备注:此所设定的参数,在JSP网页中可以使用下列方法来取得:${initParam.param_name} 若在Servlet可以使用下列方法来获得:String param_name=getServletContext...

    ssh框架在application.xml中配置数据源所需jar

    - dataAccessContext-local/jta.xml (see web.xml's "contextConfigLocation"). --&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...

    springweb3.0MVC注解(附实例)

    web.xml 中定义了一个名为 annomvc 的 Spring MVC 模块,按照 Spring MVC 的契约,需要在 WEB-INF/annomvc-servlet.xml 配置文件中定义 Spring MVC 模块的具体配置。annomvc-servlet.xml 的配置内容如下所示: &lt;?xml...

    spring和hibernate整合

    在web.Xml中 &lt;param-name&gt;contextConfigLocation &lt;param-value&gt;/WEB-INF/spring/*.bean.xml org.springframework.web.context.ContextLoaderListener &lt;listener&gt; &lt;listener-class&gt;org.spring...

    spring-simple-web:使用 Spring Framework 的简单 Web (WAR) 项目

    这个简单的例子演示了在 web 应用程序中使用的 Spring 容器,即org.springframework.web.context.WebApplicationContext Web 应用程序使用 Spring Web 侦听器初始化,例如web.xml org.springframework.web.context...

    MyContextLoaderPlugIn.jar

    和Spring中OpenSessionInView由于org.springframework.web.struts.ContextLoaderPlugIn中保存同一个对象的名不同导致openSessionInView失效 稍微修改后在struts-config.xml中使用MyContextLoaderPlugIn.jar包中...

    基于java的企业级应用开发:Spring MVC的核心类和注解.ppt

    在使用时,只需将其配置在项目的web.xml文件中,其配置代码如下: &lt;servlet&gt; &lt;servlet-name&gt;springmvc&lt;/servlet-name&gt; &lt;servlet-class&gt; org.springframework.web.servlet.DispatcherServlet &lt;/servlet-class&gt; ...

    基于java的企业级应用开发:Spring的核心容器.ppt

    Web服务器实例化ApplicationContext容器时,通常会使用ContextLoaderListener来实现,此种方式只需要在web.xml中添加如下代码: &lt;context-param&gt; &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-value&gt; ...

    企业人力资源管理项目SSH+EXT+MySQL+MD5

    在web.xml的display-name标签与welcome-file-list标签中加入一下代码 struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2 /* org.springframework.web.context....

    SSH第7章上机.zip ACCP8.0

    下面是整合的的步骤 spring整合hibernate 加入jar包 加入spring和aop所需必须包 加入hibernate的必须包 ...在struts.xml中配置对象创建工具为spring &lt;constant name="struts.objectFactory" value="spring" /&gt;

    Spring MVC 入门实例

    上面, 我们在 web.xml 文件中告诉 ContextLoaderListener, 我们还有另外两个配置文件 /WEB-INF/database.xml 和 /WEB-INF/applicationContext.xml. applicationContext.xml: 1 &lt;?xml version="1.0" encoding=...

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

    2.web工程的web.xml中配置CXFServlet &lt;!-- 设置Spring容器加载配置文件路径 --&gt; &lt;param-name&gt;contextConfigLocation &lt;param-value&gt;classpath*:applicationContext-server.xml &lt;listener-class&gt;org....

    Spring的web配置

    springmvc的资源配置:Spring 刷新Introspector防止内存泄露,Spring MVC配置;Character Encoding filter; &lt;param-name&gt;contextConfigLocation &lt;param-value&gt;classpath*:applicationContext-*.xml ...

    springmybatis

    查询出列表,也就是返回list, 在我们这个例子中也就是 List&lt;User&gt; , 这种方式返回数据,需要在User.xml 里面配置返回的类型 resultMap, 注意不是 resultType, 而这个resultMap 所对应的应该是我们自己配置的 ...

    Spring MVC Demo

    --servlet的参数配置,查找controller位置的xml文件配置,此参数指定了spring配置文件的位置 ,如果你不指定的话,默认会查找 */WEB-INF/&lt;servlet name&gt;-servlet.xml,其中由servlet的名字替换--&gt; ...

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

     本文选用的数据库为Oracle 9i,当然你可以在不改动代码的情况下,通过配置文件的调整将其移植到任何具有Blob字段类型的数据库上,如MySQL,SQLServer等。  总体实现  上传文件保存到T_FILE表中,T_FILE表结构...

    spring_MVC源码

    -- 这里在配成spring,下边也要写一个名为spring-servlet.xml的文件,主要用来配置它的controller --&gt; 19. *.do&lt;/url-pattern&gt; 20. &lt;/servlet-mapping&gt; 21. &lt;welcome-file-list&gt; 22. &lt;welcome-file&gt;index.jsp...

    tutoriel-web-spring

    api的依赖在/ web-spring-tutorial / src / main / webapp / views中创建hello.jsp 在pom.xml中添加spring-webmvc依赖项修改/WEB-INF/web.xml:添加contextConfigLocation和ContextLoaderListener 创建/WEB-INF/...

    Spring整合SpringMVC(毕业设计)

    – 第一步:编写springmvc-servlet.xml文件 – 第二步:编写web.xml文件 ...org.springframework.web.servlet.DispatcherServlet contextConfigLocation classpath:springmvc-servlet.xml

Global site tag (gtag.js) - Google Analytics