Class ServletContainerInitializerRegistrationBean<T extends ServletContainerInitializer>

java.lang.Object
org.joinfaces.servlet.ServletContainerInitializerRegistrationBean<T>
Type Parameters:
T - Type of the actual ServletContainerInitializer implementation
All Implemented Interfaces:
WebServerFactoryCustomizer<ConfigurableServletWebServerFactory>
Direct Known Subclasses:
MojarraInitializerRegistrationBean, MyFacesInitializerRegistrationBean, WeldServletContainerInitializerRegistrationBean

public class ServletContainerInitializerRegistrationBean<T extends ServletContainerInitializer> extends Object implements WebServerFactoryCustomizer<ConfigurableServletWebServerFactory>
RegistrationBean for ServletContainerInitializers.

This is implemented as WebServerFactoryCustomizer so its only applied to embedded servlet-containers. When deployed as war file, the external servlet-container will handle the ServletContainerInitializer.

  • Constructor Details

    • ServletContainerInitializerRegistrationBean

      public ServletContainerInitializerRegistrationBean(Class<T> servletContainerInitializerClass)
  • Method Details

    • customize

      public void customize(ConfigurableServletWebServerFactory factory)
      Specified by:
      customize in interface WebServerFactoryCustomizer<T extends ServletContainerInitializer>
    • getClasses

      protected Set<Class<?>> getClasses(ClassLoader classLoader)
    • findPreparedScanResult

      protected Optional<Set<Class<?>>> findPreparedScanResult(ClassLoader classLoader)
    • getPreparedScanResultPath

      public String getPreparedScanResultPath()
    • performClasspathScan

      @Nullable public Set<Class<?>> performClasspathScan()
    • handleScanResult

      protected void handleScanResult(io.github.classgraph.ScanResult scanResult)
    • getServletContainerInitializerClass

      public Class<T> getServletContainerInitializerClass()
    • isUsePreparedScanResult

      public boolean isUsePreparedScanResult()
    • setUsePreparedScanResult

      public void setUsePreparedScanResult(boolean usePreparedScanResult)