Spring 配置 web.xml (防止spring 内存溢出)
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app>
<display-name>Archetype Created Web Application</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/classes/spring/spring-context.xml
/WEB-INF/classes/spring/spring-security.xml
</param-value>
<description>contextConfigLocation configuration</description>
</context-param> <context-param>
<param-name>spring.profiles.active</param-name>
<param-value>dev</param-value>
</context-param>
<context-param>
<param-name>spring.profiles.default</param-name>
<param-value>dev</param-value>
</context-param>
<context-param>
<param-name>spring.liveBeansView.mbeanDomain</param-name>
<param-value>dev</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- 防止spring内存溢出监听器 -->
<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>
<!-- spring mvc servlet -->
<servlet>
<servlet-name>springMvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/spring/spring-mvc.xml</param-value>
</init-param>
<load-on-startup></load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springMvc</servlet-name>
<url-pattern>/ws/*</url-pattern>
</servlet-mapping> <filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter> <filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> <!-- <listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener> -->
<!-- life,20171122,add MDC Filter. -->
<!-- MDC Filter. It's used to put request message to MDC and later can get the request body content from MDC -->
<filter>
<filter-name>mdcInMessageFilter</filter-name>
<filter-class>com.icil.edi.ws.common.filter.MDCInMessageFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>mdcInMessageFilter</filter-name>
<url-pattern>/ws/*</url-pattern>
</filter-mapping>
<!-- load the log4j configure file -->
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/classes/log/log4j.properties</param-value>
</context-param> <welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
Spring 配置 web.xml (防止spring 内存溢出)的更多相关文章
- 使用spring配置类代替xml配置文件注册bean类
spring配置类,即在类上加@Configuration注解,使用这种配置类来注册bean,效果与xml文件是完全一样的,只是创建springIOC容器的方式不同: //通过xml文件创建sprin ...
- Spring与Web框架(例如Spring MVC)漫谈——关于Spring对于多个Web框架的支持
在看Spring MVC的官方文档时,最后一章是关于Spring对于其它Web框架的支持(如JSF,Apache Struts 2.x,Tapestry 5.x),当然Spring自己的MVC框架Sp ...
- 拼接xml时出现内存溢出解决办法
/// designed by Alex /// 解决内存溢出问题,不可使用迭代器和foreach /// 循环遍历List, 别生成xml,一边释放 /// 反向遍历,相当于出栈,避免索引顺序乱的问 ...
- Spring与web MVC的整合——Spring的应用上下文管理
问题1 如何让web容器加载你的web MVC框架 对于基于servlet的web容器来说,遵循的是servlet规范,入口配置文件是web.xml.这类web容器会在启动的时候会而且仅会加载如下三种 ...
- dubbo使用Spring配置暴露服务和使用Spring配置引用远程服务
提供者: <!-- 1.指定当前服务/应用的名字(同样的服务名字相同,不要和别的服务同名) --> <dubbo:application name="user-servic ...
- Spring加载applicationContext.xml实现spring容器管理的单例模式
package com.etc.pojo; import org.springframework.context.ApplicationContext; import org.springframew ...
- Spring加载applicationContext.xml实现spring容器管理的几种方式
package com.etc.test; import org.junit.Test; import org.springframework.beans.factory.BeanFactory; i ...
- ext在web工程目录导致myeclipse内存溢出问题
分类: Extjs2013-01-24 00:01 2068人阅读 评论(2) 收藏 举报 当在eclipse中的web工程中增加了extjs4,出现An internal error occurre ...
- Spring之WEB模块
Spring的WEB模块用于整合Web框架,例如Struts 1.Struts 2.JSF等 整合Struts 1 继承方式 Spring框架提供了ActionSupport类支持Struts 1的A ...
- Spring是如何校验XML的
首先来看下xml的一些概念: xml的schema里有namespace,可以给它起个别名.比如常见的spring的namespace: xmlns:mvc="http://www.spri ...
随机推荐
- [Boolan-C++学习笔记]第一周整理
1.两种典型类 Complex 无指针 String 有指针 编写思路差异较大 2.使用Class声明:Object Based.类与类之间的关系:Object Oriented 3.头文件的布局 # ...
- 《DSP using MATLAB》Problem 4.12
代码: function [As, Ac, r, v0] = invCCPP(b0, b1, a1, a2) % Determine the signal parameters Ac, As, r, ...
- POJ2311 Cutting Game
题意 Language:Default Cutting Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6007 Acc ...
- Linux挂载命令
版权声明:本文为"bcoder编程网"原创文章.原文地址:http://www.bcoder.cn,欢迎訪问! https://blog.csdn.net/wang7396/art ...
- Huawei E1750 Asterisk
http://wiki.e1550.mobi/doku.php?id=installation https://wiki.asterisk.org/wiki/display/AST/Mobile+Ch ...
- MapReduce-朴素贝叶斯
朴素贝叶斯(Native Bayes),贝叶斯在现实使用中是怎么玩的?不是根据A|B的概率获得B|A的概率,在现实中的玩法是: 首先要明白贝叶斯是一种分类算法,因为是概率所以,他的应用领域其实是比较, ...
- selenium启动谷歌所遇到的问题
最近在学习selenium webdriver,发现启动火狐时,运行非常慢,几天前一直在尝试启动谷歌驱动启动,但启动中总遇到问题,启动不起来,一直百度查找方法,还是没搞定,个人比较执着,爱钻牛角尖,弄 ...
- 求幂pow()
pow(x, n) 求x的n次方. 最简单的方法便是计算n个x相乘 public static double pow(double x, int n) { if (n == 0) return 1; ...
- 新玩具,React v16.7.0-alpha Hooks
周五看见React v16.7.0-alpha Hooks,今早起来看见圈里已经刷屏了Hooks,正好周末,正好IG和G2的比赛还没开始,研究下... 刚刚接触react时候非常喜欢用函数式组件,因为 ...
- Mybatis学习(2)原始dao开发和使用mapper接口代理开发
基础知识: 1).SqlSessionFactoryBuilder: 通过SqlSessionFactoryBuilder创建会话工厂SqlSessionFactory.将SqlSessionFact ...