Top Description Methods
org.springframework.web.context

public Interface ConfigurableWebEnvironment

extends ConfigurableEnvironment
Known Direct Implementers
org.springframework.web.context.support.StandardServletEnvironment
Imports
jakarta.servlet.ServletConfig, .ServletContext, org.springframework.core.env.ConfigurableEnvironment, org.springframework.lang.Nullable

Specialization of ConfigurableEnvironment allowing initialization of servlet-related org.springframework.core.env.PropertySource objects at the earliest moment that the ServletContext and (optionally) ServletConfig become available.
Author
Chris Beams
Since
3.1.2
See Also
ConfigurableWebApplicationContext#getEnvironment()

Method Summary

Modifier and TypeMethod and Description
public void
initPropertySources(ServletContext
the ServletContext (may not be null)
servletContext
,
ServletConfig
the ServletConfig (null if not available)
servletConfig
)

Replace any stub property source instances acting as placeholders with real servlet context/config property sources using the given parameters.

Inherited from org.springframework.core.env.ConfigurableEnvironment:
addActiveProfilegetPropertySourcesgetSystemEnvironmentgetSystemPropertiesmergesetActiveProfilessetDefaultProfiles

Method Detail

initPropertySourcesback to summary
public void initPropertySources(ServletContext servletContext, ServletConfig servletConfig)

Replace any stub property source instances acting as placeholders with real servlet context/config property sources using the given parameters.

Parameters
servletContext:ServletContext

the ServletContext (may not be null)

servletConfig:ServletConfig

the ServletConfig (null if not available)

See Also
org.springframework.web.context.support.WebApplicationContextUtils#initServletPropertySources(org.springframework.core.env.MutablePropertySources, ServletContext, ServletConfig)