类 StandardPortletEnvironment
- java.lang.Object
- org.springframework.core.env.AbstractEnvironment
- org.springframework.core.env.StandardEnvironment
- org.springframework.web.portlet.context.StandardPortletEnvironment
public class StandardPortletEnvironment extends StandardEnvironment
Environment
implementation to be used byServlet
-based web applications. All Portlet-relatedApplicationContext
classes initialize an instance by default.Contributes
ServletContext
,PortletContext
,PortletConfig
and JNDI-basedPropertySource
instances. See thecustomizePropertySources(org.springframework.core.env.MutablePropertySources)
method for details.- 从以下版本开始:
- 3.1
- 作者:
- Chris Beams, Juergen Hoeller
- 另请参阅:
StandardEnvironment
,StandardServletEnvironment
字段概要
字段 修饰符和类型 字段 说明 static String
PORTLET_CONFIG_PROPERTY_SOURCE_NAME
Portlet config init parameters property source name: "portletConfigInitParams"static String
PORTLET_CONTEXT_PROPERTY_SOURCE_NAME
Portlet context init parameters property source name: "portletContextInitParams"从类继承的字段 org.springframework.core.env.StandardEnvironment
SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME, SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME
从类继承的字段 org.springframework.core.env.AbstractEnvironment
ACTIVE_PROFILES_PROPERTY_NAME, DEFAULT_PROFILES_PROPERTY_NAME, IGNORE_GETENV_PROPERTY_NAME, logger, RESERVED_DEFAULT_PROFILE_NAME
构造器概要
构造器 构造器 说明 StandardPortletEnvironment()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected void
customizePropertySources(MutablePropertySources propertySources)
Customize the set of property sources with those contributed by superclasses as well as those appropriate for standard portlet-based environments: "portletConfigInitParams""portletContextInitParams""servletContextInitParams""jndiProperties"void
initPropertySources(ServletContext servletContext, PortletContext portletContext, PortletConfig portletConfig)
Replace any stub property source instances acting as placeholders with real portlet context/config property sources using the given parameters.从类继承的方法 org.springframework.core.env.AbstractEnvironment
acceptsProfiles, addActiveProfile, containsProperty, doGetActiveProfiles, doGetDefaultProfiles, getActiveProfiles, getConversionService, getDefaultProfiles, getProperty, getProperty, getProperty, getProperty, getPropertyAsClass, getPropertySources, getRequiredProperty, getRequiredProperty, getReservedDefaultProfiles, getSystemEnvironment, getSystemProperties, isProfileActive, merge, resolvePlaceholders, resolveRequiredPlaceholders, setActiveProfiles, setConversionService, setDefaultProfiles, setIgnoreUnresolvableNestedPlaceholders, setPlaceholderPrefix, setPlaceholderSuffix, setRequiredProperties, setValueSeparator, suppressGetenvAccess, toString, validateProfile, validateRequiredProperties
字段详细资料
PORTLET_CONTEXT_PROPERTY_SOURCE_NAME
public static final String PORTLET_CONTEXT_PROPERTY_SOURCE_NAME
Portlet context init parameters property source name: "portletContextInitParams"- 另请参阅:
- 常量字段值
PORTLET_CONFIG_PROPERTY_SOURCE_NAME
public static final String PORTLET_CONFIG_PROPERTY_SOURCE_NAME
Portlet config init parameters property source name: "portletConfigInitParams"- 另请参阅:
- 常量字段值
构造器详细资料
StandardPortletEnvironment
public StandardPortletEnvironment()
方法详细资料
customizePropertySources
protected void customizePropertySources(MutablePropertySources propertySources)
Customize the set of property sources with those contributed by superclasses as well as those appropriate for standard portlet-based environments:Properties present in "portletConfigInitParams" will take precedence over those in "portletContextInitParams", which takes precedence over those in "servletContextInitParams" and so on.
Properties in any of the above will take precedence over system properties and environment variables contributed by the
StandardEnvironment
superclass.The property sources are added as stubs for now, and will be fully initialized once the actual
PortletConfig
,PortletContext
, andServletContext
objects are available.- 覆盖:
customizePropertySources
在类中StandardEnvironment
- 另请参阅:
StandardEnvironment.customizePropertySources(org.springframework.core.env.MutablePropertySources)
,AbstractEnvironment.customizePropertySources(org.springframework.core.env.MutablePropertySources)
,PortletConfigPropertySource
,PortletContextPropertySource
,PortletApplicationContextUtils.initPortletPropertySources(org.springframework.core.env.MutablePropertySources, javax.servlet.ServletContext, javax.portlet.PortletContext, javax.portlet.PortletConfig)
initPropertySources
public void initPropertySources(ServletContext servletContext, PortletContext portletContext, PortletConfig portletConfig)
Replace any stub property source instances acting as placeholders with real portlet context/config property sources using the given parameters.- 参数:
servletContext
- theServletContext
(may benull
)portletContext
- thePortletContext
(may not benull
)portletConfig
- thePortletConfig
(null
if not available)- 另请参阅:
PortletApplicationContextUtils.initPortletPropertySources( org.springframework.core.env.MutablePropertySources, ServletContext, PortletContext, PortletConfig)