Class SecurityWebApplicationContextUtils


  • public abstract class SecurityWebApplicationContextUtils
    extends org.springframework.web.context.support.WebApplicationContextUtils
    Spring Security extension to Spring's WebApplicationContextUtils.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.springframework.web.context.WebApplicationContext findRequiredWebApplicationContext​(javax.servlet.ServletContext servletContext)
      Find a unique WebApplicationContext for this web app: either the root web app context (preferred) or a unique WebApplicationContext among the registered ServletContext attributes (typically coming from a single DispatcherServlet in the current web application).
      • Methods inherited from class org.springframework.web.context.support.WebApplicationContextUtils

        findWebApplicationContext, getRequiredWebApplicationContext, getWebApplicationContext, getWebApplicationContext, initServletPropertySources, initServletPropertySources, registerEnvironmentBeans, registerEnvironmentBeans, registerWebApplicationScopes, registerWebApplicationScopes
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SecurityWebApplicationContextUtils

        public SecurityWebApplicationContextUtils()
    • Method Detail

      • findRequiredWebApplicationContext

        public static org.springframework.web.context.WebApplicationContext findRequiredWebApplicationContext​(javax.servlet.ServletContext servletContext)
        Find a unique WebApplicationContext for this web app: either the root web app context (preferred) or a unique WebApplicationContext among the registered ServletContext attributes (typically coming from a single DispatcherServlet in the current web application).

        Note that DispatcherServlet's exposure of its context can be controlled through its publishContext property, which is true by default but can be selectively switched to only publish a single context despite multiple DispatcherServlet registrations in the web app.

        Parameters:
        servletContext - ServletContext to find the web application context for
        Returns:
        the desired WebApplicationContext for this web app
        Throws:
        java.lang.IllegalStateException - if no WebApplicationContext can be found
        See Also:
        WebApplicationContextUtils.getWebApplicationContext(ServletContext), ServletContext.getAttributeNames()