/** * Convenient variant of {@link #initServletPropertySources(MutablePropertySources, * ServletContext, ServletConfig)} that always provides {@code null} for the * {@link ServletConfig} parameter. * @see #initServletPropertySources(MutablePropertySources, ServletContext, ServletConfig) */ public static void initServletPropertySources(MutablePropertySources propertySources, ServletContext servletContext) { initServletPropertySources(propertySources, servletContext, null); }
/** * Convenient variant of {@link #initServletPropertySources(MutablePropertySources, * ServletContext, ServletConfig)} that always provides {@code null} for the * {@link ServletConfig} parameter. * @see #initServletPropertySources(MutablePropertySources, ServletContext, ServletConfig) */ public static void initServletPropertySources(MutablePropertySources propertySources, ServletContext servletContext) { initServletPropertySources(propertySources, servletContext, null); }
@Override protected void initPropertySources() { WebApplicationContextUtils.initServletPropertySources(getEnvironment().getPropertySources(), this.servletContext, this.servletConfig); }
@Override public void initPropertySources(@Nullable ServletContext servletContext, @Nullable ServletConfig servletConfig) { WebApplicationContextUtils.initServletPropertySources(getPropertySources(), servletContext, servletConfig); }
@Override protected void initPropertySources() { WebApplicationContextUtils.initServletPropertySources(getEnvironment().getPropertySources(), this.servletContext, this.servletConfig); }
@Override public void initPropertySources(@Nullable ServletContext servletContext, @Nullable ServletConfig servletConfig) { WebApplicationContextUtils.initServletPropertySources(getPropertySources(), servletContext, servletConfig); }
@Override protected void initPropertySources() { super.initPropertySources(); WebApplicationContextUtils.initServletPropertySources( this.getEnvironment().getPropertySources(), this.servletContext); }
servletContext.addListener(publisher); WebApplicationContextUtils.initServletPropertySources(applicationContext.getEnvironment().getPropertySources(), servletContext, applicationContext.getServletConfig());
/** * Convenient variant of {@link #initServletPropertySources(MutablePropertySources, * ServletContext, ServletConfig)} that always provides {@code null} for the * {@link ServletConfig} parameter. * @see #initServletPropertySources(MutablePropertySources, ServletContext, ServletConfig) */ public static void initServletPropertySources(MutablePropertySources propertySources, ServletContext servletContext) { initServletPropertySources(propertySources, servletContext, null); }
/** * Convenient variant of {@link #initServletPropertySources(MutablePropertySources, * ServletContext, ServletConfig)} that always provides {@code null} for the * {@link ServletConfig} parameter. * @see #initServletPropertySources(MutablePropertySources, ServletContext, ServletConfig) */ public static void initServletPropertySources(MutablePropertySources propertySources, ServletContext servletContext) { initServletPropertySources(propertySources, servletContext, null); }
@Override protected void initPropertySources() { WebApplicationContextUtils.initServletPropertySources(getEnvironment().getPropertySources(), this.servletContext, this.servletConfig); }
@Override public void initPropertySources(@Nullable ServletContext servletContext, @Nullable ServletConfig servletConfig) { WebApplicationContextUtils.initServletPropertySources(getPropertySources(), servletContext, servletConfig); }
@Override protected void initPropertySources() { WebApplicationContextUtils.initServletPropertySources(getEnvironment().getPropertySources(), this.servletContext, this.servletConfig); }
@Override public void initPropertySources(@Nullable ServletContext servletContext, @Nullable ServletConfig servletConfig) { WebApplicationContextUtils.initServletPropertySources(getPropertySources(), servletContext, servletConfig); }
/** * Replace {@code Servlet}- and {@code Portlet}-based stub property sources * with actual instances populated with the given context and config objects. * @see org.springframework.core.env.PropertySource.StubPropertySource * @see org.springframework.core.env.ConfigurableEnvironment#getPropertySources() * @see org.springframework.web.context.support.WebApplicationContextUtils#initServletPropertySources(MutablePropertySources, ServletContext) */ public static void initPortletPropertySources(MutablePropertySources propertySources, ServletContext servletContext, PortletContext portletContext, PortletConfig portletConfig) { Assert.notNull(propertySources, "propertySources must not be null"); WebApplicationContextUtils.initServletPropertySources(propertySources, servletContext); if(portletContext != null && propertySources.contains(StandardPortletEnvironment.PORTLET_CONTEXT_PROPERTY_SOURCE_NAME)) { propertySources.replace(StandardPortletEnvironment.PORTLET_CONTEXT_PROPERTY_SOURCE_NAME, new PortletContextPropertySource(StandardPortletEnvironment.PORTLET_CONTEXT_PROPERTY_SOURCE_NAME, portletContext)); } if(portletConfig != null && propertySources.contains(StandardPortletEnvironment.PORTLET_CONFIG_PROPERTY_SOURCE_NAME)) { propertySources.replace(StandardPortletEnvironment.PORTLET_CONFIG_PROPERTY_SOURCE_NAME, new PortletConfigPropertySource(StandardPortletEnvironment.PORTLET_CONFIG_PROPERTY_SOURCE_NAME, portletConfig)); } }
WebApplicationContextUtils.initServletPropertySources(propertySources, servletContext);