Official address: http://undertow.io/documentation/servlet/servlet-extensions.html to study, mark.
Source Address: Https://github.com/undertow-io/undertow/tree/c3b8a88db6999c231b4def84437d8c32cf1e2efe
servlet extensionsservlet extensions allow you to hooks into the Servlet deployment process, and modify aspect of a Ser Vlet deployment. In some ways they is similar to Servletcontainerinitializer or Servletcontextlistener, however they provides much more FL Exibility over, can be modified. In order to create a servletextension it was necessary to implement Io.undertow.servlet.ServletExtension, and then add the Name of your implementationclassTo Meta-inf/services/io.undertow.servlet.servletextension. When Undertow is deploying a Servlet deployment it would load all such services from the deploymentsclassloader, and then invoke their Handledeployment method. This method was passed an undertow deploymentinfo structure, which contains a complete and mutable description of the Deplo Yment, my modifying ThisStructure it is possible to change any aspect of the deployment. The DEPLOYMENTINFO structure is the same structure that's used by the embedded API so-in effect a servletextension have t He same amount of flexibility that you had when using the undertow in embedded mode. There is many possible use cases for This, a common one would is to add additional authentication mechanisms to a deployment, or to usenativeUndertow handlers as part of a Servlet deployment.
Spring servlet Extension Undertow