public class LambdaSpringApplicationInitializer
extends javax.servlet.http.HttpServlet
implements org.springframework.web.WebApplicationInitializer
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ERROR_NO_CONTEXT |
| Constructor and Description |
|---|
LambdaSpringApplicationInitializer(org.springframework.web.context.ConfigurableWebApplicationContext applicationContext)
Creates a new instance of the WebApplicationInitializer
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(javax.servlet.ServletContextListener listener)
Adds a new listener for the servlet context events.
|
void |
dispatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Given a request and response objects, triggers the filters set in the servlet context and
|
org.springframework.web.servlet.DispatcherServlet |
getDispatcherServlet()
Gets the initialized Spring dispatcher servlet instance.
|
void |
onStartup(javax.servlet.ServletContext servletContext) |
void |
service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res) |
void |
setRefreshContext(boolean refreshContext) |
void |
setSpringProfiles(javax.servlet.ServletContext ctx,
java.lang.String... springProfiles) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicepublic static final java.lang.String ERROR_NO_CONTEXT
public LambdaSpringApplicationInitializer(org.springframework.web.context.ConfigurableWebApplicationContext applicationContext)
applicationContext - A custom ConfigurableWebApplicationContext to be usedpublic void addListener(javax.servlet.ServletContextListener listener)
listener - An implementation of `ServletContextListener`public void setRefreshContext(boolean refreshContext)
public void dispatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
request - The incoming requestresponse - The response object Spring should write to.javax.servlet.ServletException - When an error occurs during processing or of the requestjava.io.IOException - When an error occurs while writing the responsepublic org.springframework.web.servlet.DispatcherServlet getDispatcherServlet()
public void setSpringProfiles(javax.servlet.ServletContext ctx,
java.lang.String... springProfiles)
throws ContainerInitializationException
ContainerInitializationExceptionpublic void onStartup(javax.servlet.ServletContext servletContext)
throws javax.servlet.ServletException
onStartup in interface org.springframework.web.WebApplicationInitializerjavax.servlet.ServletExceptionpublic void service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
service in interface javax.servlet.Servletservice in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionjava.io.IOExceptionCopyright © 2018. All Rights Reserved.