In Java development, if the framework or program uses JavaBeans Introspector, then a system-level cache is enabled, which holds references to JavaBean that have been loaded and analyzed, and when the Web server shuts down, Because these javabean references are stored in this cache, the garbage collector cannot reclaim the JavaBean objects in the Web container, causing the memory to become larger. A listener named Org.springframework.web.util.IntrospectorCleanupListener is provided in spring. It is primarily responsible for handling buffer leaks caused by the use of JavaBeans introspector.
(official explanation) Introspectorcleanuplistener is a listener that clears the JavaBeans introspector when the Web app is closed. Web. XML to register this listener. When the app shuts down, it frees the class loader associated with the Web app and the classes it manages. Note that the spring The managed bean does not need to use this listener. Because the buffers used by spring's own introspection are parsed out of a class and are immediately removed from the JavaBeans Introspector in the buffer. Classes in your application never use JavaBeans introspector directly. So they generally do not cause internal viewing of resource leaks. But some class libraries and frameworks often produce this problem. For example: Struts and quartz. A single internal view leak can cause the entire web app's classloader to not be garbage collected. After the web app is closed, you'll see all of the static class resources for this app (for example, Singleton). This error is certainly not caused by the class itself.
How to use: Configure in the Web. xml file
<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>
Use Introspectorcleanuplistener to resolve memory leak issues when using frameworks such as spring, structs, etc.