-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Description
Spring boot:1.5.12.RELEASE
Container:spring-boot-starter-undertow
when i defined the MyServletContextListener class with the @weblistener annotation
and add the @ServletComponentScan annotation on the bootstrap class
when i start the server
1、EmbeddedWebApplicationContext#onRefresh called the createEmbeddedServletContainer
2、UndertowEmbeddedServletContainerFactory#createDeploymentManager
3、DeploymentImpl#deploy method will add the MyServletContextListene
4、the MyServletContextListener#contextInitialized method called
but when i stop the server
1、EmbeddedWebApplicationContext#onClose called the stopAndReleaseEmbeddedServletContainer
2、UndertowEmbeddedServletContainer#stop
3、DeploymentManager#stop, do not called the undeploy method, so the contextDestroyed is not called
How can I solve it? By the way,change the spring-boot-starter-tomcat it is ok