【发布时间】:2025-12-13 08:30:01
【问题描述】:
spring框架中关于IntrospectorCleanupListener的文档中提到这个监听器应该在web.xml中注册为第一个。
... *
这个监听器应该注册为{@code web.xml}中的第一个监听器, * 在任何应用程序侦听器(例如 Spring 的 ContextLoaderListener)之前。 * 这允许监听器在生命周期的正确时间充分发挥作用。 * * @作者于尔根·霍勒 * @since 1.1 * @see java.beans.Introspector#flushCaches() * @see org.springframework.beans.CachedIntrospectionResults#acceptClassLoader * @see org.springframework.beans.CachedIntrospectionResults#clearClassLoader */
为什么要把它放在第一个?如果没有会发生什么?
【问题讨论】: