类 ServletContextApplicationContextInitializer
- java.lang.Object
- org.springframework.boot.web.support.ServletContextApplicationContextInitializer
- 所有已实现的接口:
org.springframework.context.ApplicationContextInitializer<org.springframework.web.context.ConfigurableWebApplicationContext>
,org.springframework.core.Ordered
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.- 从以下版本开始:
- 1.4.0
构造器概要
构造器 构造器 说明 ServletContextApplicationContextInitializer(javax.servlet.ServletContext servletContext)
Create a newServletContextApplicationContextInitializer
instance.ServletContextApplicationContextInitializer(javax.servlet.ServletContext servletContext, boolean addApplicationContextAttribute)
Create a newServletContextApplicationContextInitializer
instance.
构造器详细资料
ServletContextApplicationContextInitializer
public ServletContextApplicationContextInitializer(javax.servlet.ServletContext servletContext)
Create a newServletContextApplicationContextInitializer
instance.- 参数:
servletContext
- the servlet that should be ultimately set.
ServletContextApplicationContextInitializer
public ServletContextApplicationContextInitializer(javax.servlet.ServletContext servletContext, boolean addApplicationContextAttribute)
Create a newServletContextApplicationContextInitializer
instance.- 参数:
servletContext
- the servlet that should be ultimately set.addApplicationContextAttribute
- if theApplicationContext
should be stored as an attribute in theServletContext
- 从以下版本开始:
- 1.3.4
方法详细资料
setOrder
public void setOrder(int order)
getOrder
public int getOrder()
- 指定者:
getOrder
在接口中org.springframework.core.Ordered
initialize
public void initialize(org.springframework.web.context.ConfigurableWebApplicationContext applicationContext)
- 指定者:
initialize
在接口中org.springframework.context.ApplicationContextInitializer<org.springframework.web.context.ConfigurableWebApplicationContext>