org.springframework.boot.web.servlet.context

Class XmlServletWebServerApplicationContext

    • Constructor Detail

      • XmlServletWebServerApplicationContext

        public XmlServletWebServerApplicationContext(Resource... resources)
        Create a new XmlServletWebServerApplicationContext, loading bean definitions from the given resources and automatically refreshing the context.
        Parameters:
        resources - the resources to load from
      • XmlServletWebServerApplicationContext

        public XmlServletWebServerApplicationContext(String... resourceLocations)
        Create a new XmlServletWebServerApplicationContext, loading bean definitions from the given resource locations and automatically refreshing the context.
        Parameters:
        resourceLocations - the resources to load from
      • XmlServletWebServerApplicationContext

        public XmlServletWebServerApplicationContext(Class<?> relativeClass,
                                                     String... resourceNames)
        Create a new XmlServletWebServerApplicationContext, loading bean definitions from the given resource locations and automatically refreshing the context.
        Parameters:
        relativeClass - class whose package will be used as a prefix when loading each specified resource name
        resourceNames - relatively-qualified names of resources to load
    • Method Detail

      • setValidating

        public void setValidating(boolean validating)
        Set whether to use XML validation. Default is true.
        Parameters:
        validating - if validating the XML
      • load

        public final void load(Resource... resources)
        Load bean definitions from the given XML resources.
        Parameters:
        resources - one or more resources to load from
      • load

        public final void load(String... resourceLocations)
        Load bean definitions from the given XML resources.
        Parameters:
        resourceLocations - one or more resource locations to load from
      • load

        public final void load(Class<?> relativeClass,
                               String... resourceNames)
        Load bean definitions from the given XML resources.
        Parameters:
        relativeClass - class whose package will be used as a prefix when loading each specified resource name
        resourceNames - relatively-qualified names of resources to load