`

教你怎么避免重启你的应用程式 web ReLoadConfig ReLoadInterval contextConfigLocation

 
阅读更多

教你怎么避免重启你的应用程式

 

在web.xml中

 

<context-param>
<param-name>ReLoadConfig</param-name>
<param-value>false</param-value>
</context-param>


<context-param>
<param-name>ReLoadInterval</param-name>
<param-value>5000</param-value>
</context-param>

 

 

<!-- Spring ApplicationContext配置文件的路径。可使用通配符,多个路径用逗号分隔。
此参数用于后面的“Spring-Context loader” -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:resources/spring/*.xml</param-value>
</context-param>

 

分享到:
评论

相关推荐

    Springmvc-annotation_contextConfigLocation

    SpringMVC配置控制器有两种方式,常用的是通过WEB-INF下的[servlet-name]-servlet.xml,本项目采用的是另外一种通过配置配置文件路径的方式来实现Springmvc的配置。

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

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

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

    Web 应用程序使用 Spring Web 侦听器初始化,例如web.xml org.springframework.web.context.ContextLoaderListener 。 Spring Web 侦听器使用web.xml的contextConfigLocation上下文参数进行初始化。 此设置的...

    JAVA web.xml配置详解

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

    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;!-- ...

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

    * * * * Spring MVC的核心类和注解 请输入您的部门/机构名称 12.1 DispatcherServlet DispatcherServlet的全名是org.springframework.web.servlet.DispatcherServlet,它在程序中充当着前端控制器的角色。...

    基于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; ...

    MyContextLoaderPlugIn.jar

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

    Spring MVC 框架应用实例

    &lt;param-name&gt;contextConfigLocation /WEB-INF/database.xml /WEB-INF/applicationContext.xml org.springframework.web.context.ContextLoaderListener &lt;filter-name&gt;...

    Spring MVC 入门实例

    这篇文章将教你快速地上手使用 Spring 框架. 如果你手上有一本《Spring in Action》, 那么你最好从第三部分"Spring 在 Web 层的应用--建立 Web 层"开始看, 否则那将是一场恶梦! 首先, 我需要在你心里建立起 Spring...

    DOS命令使用方法(超全).

    &lt;param-name&gt;contextConfigLocation &lt;param-value&gt;classpath*:applicationContext-*.xml &lt;!-- 这是spring 监听 --&gt; &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener &lt;!...

    Spring的web配置

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

    ssh框架的搭建

    /WEB-INF/applicationContext-*.xml,/WEB-INF/action-servlet.xml &lt;param-name&gt;log4jConfigLocation &lt;param-value&gt;/WEB-INF/log4j.properties &lt;!-- Listener contextConfigLocation --&gt; ...

    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...

    一个简单的Acegi入门实例

    &lt;!!-- web.xml文件 --&gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt; ...&lt;param-value&gt;/WEB-INF/acegi-config.xml&lt;/param-value&gt; &lt;/context-param&gt; &lt;!-- Acegi 的 Filter Chain 代理 --&gt; &lt;filter&gt; &lt;filter-name&gt;

    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/...

    springmybatis

    1. 现阶段,你可以直接建立java 工程,但一般都是开发web项目,这个系列教程最后也是web的,所以一开始就建立web工程。 2. 将 mybatis-3.2.0-SNAPSHOT.jar,mysql-connector-java-5.1.22-bin.jar 拷贝到 web工程的...

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

    WEB-INF下的applicationContext.xml为Spring的配置文件,struts-config.xml为Struts的配置文件,file-upload.jsp为文件上传页面,file-list.jsp为文件列表页面。  本文后面的章节将从数据持久层->业务层->Web层的...

    Spring MVC Demo

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

    Spring+mybatis整合实例应用

    项目结构图(Spring3.0.2+mybatis3.0.4)应用数据库对应的实体类数据Dao接口在config目录下进行Mapper文件配置Mybatis应用配置文件MyBatis-Configuration.xmlSpring配置文件,本例中我们放在/WebRoot/WEB-INF/...

Global site tag (gtag.js) - Google Analytics