org.springframework.context.support

Class GenericXmlApplicationContext

    • Constructor Detail

      • GenericXmlApplicationContext

        public GenericXmlApplicationContext()
        Create a new GenericXmlApplicationContext that needs to be loaded and then manually refreshed.
      • GenericXmlApplicationContext

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

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

        public GenericXmlApplicationContext(java.lang.Class<?> relativeClass,
                                            java.lang.String... resourceNames)
        Create a new GenericXmlApplicationContext, 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.
      • load

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

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

        public void load(java.lang.Class<?> relativeClass,
                         java.lang.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