public class MicronautServletInitializer
extends java.lang.Object
implements javax.servlet.ServletContainerInitializer
Constructor and Description |
---|
MicronautServletInitializer() |
Modifier and Type | Method and Description |
---|---|
protected io.micronaut.context.ApplicationContextBuilder |
buildApplicationContext(javax.servlet.ServletContext ctx)
Builds the application context.
|
void |
onStartup(java.util.Set<java.lang.Class<?>> c,
javax.servlet.ServletContext ctx)
Notifies this ServletContainerInitializer of the startup
of the application represented by the given ServletContext.
|
public void onStartup(java.util.Set<java.lang.Class<?>> c, javax.servlet.ServletContext ctx)
javax.servlet.ServletContainerInitializer
If this ServletContainerInitializer is bundled in a JAR file inside the WEB-INF/lib directory of an application, its onStartup method will be invoked only once during the startup of the bundling application. If this ServletContainerInitializer is bundled inside a JAR file outside of any WEB-INF/lib directory, but still discoverable as described above, its onStartup method will be invoked every time an application is started.
onStartup
in interface javax.servlet.ServletContainerInitializer
c
- the Set of application classes that extend, implement, or
have been annotated with the class types specified by the
HandlesTypes
annotation,
or null if there are no matches, or this
ServletContainerInitializer has not been annotated with
HandlesTypesctx
- the ServletContext of the web application that
is being started and in which the classes contained in c
were foundprotected io.micronaut.context.ApplicationContextBuilder buildApplicationContext(javax.servlet.ServletContext ctx)
ctx
- The context