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 Summary
ConstructorDescriptionMicronautServletInitializer
(io.micronaut.context.ApplicationContext applicationContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMicronautServletMapping
(String mapping) Adds an additional mapping for the micronaut servlet.protected io.micronaut.context.ApplicationContextBuilder
buildApplicationContext
(jakarta.servlet.ServletContext ctx) Builds the application context.void
-
Constructor Details
-
MicronautServletInitializer
@Inject public MicronautServletInitializer(io.micronaut.context.ApplicationContext applicationContext) -
MicronautServletInitializer
public MicronautServletInitializer()
-
-
Method Details
-
onStartup
- Specified by:
onStartup
in interfacejakarta.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
Adds an additional mapping for the micronaut servlet.- Parameters:
mapping
- The mapping.
-