Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我发现在 WAS8 中, a 上的静态初始化程序在PhaseListener之前执行,这ServletContextListener给我们带来了问题,因为 phaselistener 依赖于上下文侦听器已经完成的一些初始化。
PhaseListener
ServletContextListener
我认为这是因为在加载类时调用了静态初始化程序,但为什么在 servlet 上下文侦听器之前加载它?我认为上下文侦听器是关于在启动 Web 应用程序时加载和运行的第一件事。
有谁知道为什么会这样?