• org.springframework.web.util.IntrospectorCleanupListener的用途


    /**
     * org.springframework.web.util.IntrospectorCleanupListener的用途
     * @see -------------------------------------------------------------------------------------------------------------------
     * @see 此监听器出用于主要为了解决java.beans.Introspector导致内存泄漏的问题
     * @see 此监听器应该配置在web.xml中与Spring相关监听器中的第一个位置(也要在ContextLoaderListener的前面)
     * @see -------------------------------------------------------------------------------------------------------------------
     * @see JDK中的java.beans.Introspector类的用途是发现Java类是否符合JavaBean规范
     * @see 如果有的框架或程序用到了Introspector类,那么就会启用一个系统级别的缓存,此缓存会存放一些曾加载并分析过的JavaBean的引用
     * @see 当Web服务器关闭时,由于此缓存中存放着这些JavaBean的引用,所以垃圾回收器无法回收Web容器中的JavaBean对象,最后导致内存变大
     * @see 而org.springframework.web.util.IntrospectorCleanupListener就是专门用来处理Introspector内存泄漏问题的辅助类
     * @see IntrospectorCleanupListener会在Web服务器停止时清理Introspector缓存,使那些Javabean能被垃圾回收器正确回收
     * @see -------------------------------------------------------------------------------------------------------------------
     * @see Spring自身不会出现这种问题
     * @see 因为Spring在加载并分析完一个类之后会马上刷新JavaBeans Introspector缓存,这就保证Spring中不会出现这种内存泄漏的问题
     * @see 但有些程序和框架在使用了JavaBeans Introspector之后,没有进行清理工作(如Quartz,Struts),最后导致内存泄漏
     * @see -------------------------------------------------------------------------------------------------------------------
     * @create Sep 24, 2013 9:10:09 PM
     * @author 玄玉<http://blog.csdn.net/jadyer>
     */
  • 相关阅读:
    git commit 说明
    spark源码学习源码环境安装(window10)
    使用Python3的psutil模块监控磁盘使用率并发送邮件
    jenkins登录报403,而且不需要用户登录就能使用
    重置 vCenter Server Appliance 5.5 和 6.0 的 root 帐户密码 (2069041)
    vmware vsphere出现“需要整合虚拟机磁盘”的告警
    修改了主机名 veeam backup service 服务启动不了
    C# ArcGISEngine提取Modis数据的指定层数据
    debian linux qt creator install
    Ubuntu 常用命令大全
  • 原文地址:https://www.cnblogs.com/hanxue112253/p/3877383.html
Copyright © 2020-2023  润新知