public class ServletContextApplicationContextInitializer extends Object implements org.springframework.context.ApplicationContextInitializer<org.springframework.web.context.ConfigurableWebApplicationContext>, org.springframework.core.Ordered
ApplicationContextInitializer
for setting the servlet context.Constructor and Description |
---|
ServletContextApplicationContextInitializer(javax.servlet.ServletContext servletContext)
Create a new
ServletContextApplicationContextInitializer instance. |
ServletContextApplicationContextInitializer(javax.servlet.ServletContext servletContext,
boolean addApplicationContextAttribute)
Create a new
ServletContextApplicationContextInitializer instance. |
Modifier and Type | Method and Description |
---|---|
int |
getOrder() |
void |
initialize(org.springframework.web.context.ConfigurableWebApplicationContext applicationContext) |
void |
setOrder(int order) |
public ServletContextApplicationContextInitializer(javax.servlet.ServletContext servletContext)
ServletContextApplicationContextInitializer
instance.servletContext
- the servlet that should be ultimately set.public ServletContextApplicationContextInitializer(javax.servlet.ServletContext servletContext, boolean addApplicationContextAttribute)
ServletContextApplicationContextInitializer
instance.servletContext
- the servlet that should be ultimately set.addApplicationContextAttribute
- if the ApplicationContext
should be
stored as an attribute in the ServletContext
public void setOrder(int order)
public int getOrder()
getOrder
in interface org.springframework.core.Ordered
public void initialize(org.springframework.web.context.ConfigurableWebApplicationContext applicationContext)
initialize
in interface org.springframework.context.ApplicationContextInitializer<org.springframework.web.context.ConfigurableWebApplicationContext>
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.