public class ServletContextApplicationContextInitializer extends Object implements ApplicationContextInitializer<ConfigurableWebApplicationContext>, Ordered
ApplicationContextInitializer
for setting the servlet context.HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
ServletContextApplicationContextInitializer(ServletContext servletContext)
Create a new
ServletContextApplicationContextInitializer instance. |
ServletContextApplicationContextInitializer(ServletContext servletContext,
boolean addApplicationContextAttribute)
Create a new
ServletContextApplicationContextInitializer instance. |
Modifier and Type | Method and Description |
---|---|
int |
getOrder() |
void |
initialize(ConfigurableWebApplicationContext applicationContext) |
void |
setOrder(int order) |
public ServletContextApplicationContextInitializer(ServletContext servletContext)
ServletContextApplicationContextInitializer
instance.servletContext
- the servlet that should be ultimately set.public ServletContextApplicationContextInitializer(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 void initialize(ConfigurableWebApplicationContext applicationContext)
initialize
in interface ApplicationContextInitializer<ConfigurableWebApplicationContext>
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.