Class MicronautServletInitializer

java.lang.Object
io.micronaut.servlet.engine.initializer.MicronautServletInitializer
All Implemented Interfaces:
jakarta.servlet.ServletContainerInitializer

@Prototype public class MicronautServletInitializer extends Object implements jakarta.servlet.ServletContainerInitializer
A servlet initializer for Micronaut for deployment as a WAR file.
Since:
1.0.0
Author:
graemerocher
  • Constructor Details

    • MicronautServletInitializer

      @Inject public MicronautServletInitializer(io.micronaut.context.ApplicationContext applicationContext)
    • MicronautServletInitializer

      public MicronautServletInitializer()
  • Method Details

    • onStartup

      public void onStartup(Set<Class<?>> c, jakarta.servlet.ServletContext ctx)
      Specified by:
      onStartup in interface jakarta.servlet.ServletContainerInitializer
    • buildApplicationContext

      protected io.micronaut.context.ApplicationContextBuilder buildApplicationContext(jakarta.servlet.ServletContext ctx)
      Builds the application context.
      Parameters:
      ctx - The context
      Returns:
      The application context builder
    • addMicronautServletMapping

      public void addMicronautServletMapping(String mapping)
      Adds an additional mapping for the micronaut servlet.
      Parameters:
      mapping - The mapping.