spring-framework / org.springframework.beans.factory.xml / DefaultNamespaceHandlerResolver

DefaultNamespaceHandlerResolver

open class DefaultNamespaceHandlerResolver : NamespaceHandlerResolver

Default implementation of the NamespaceHandlerResolver interface. Resolves namespace URIs to implementation classes based on the mappings contained in mapping file.

By default, this implementation looks for the mapping file at META-INF/spring.handlers, but this can be changed using the #DefaultNamespaceHandlerResolver(ClassLoader, String) constructor.

Author
Rob Harrop

Author
Juergen Hoeller

Since
2.0

See Also
NamespaceHandlerDefaultBeanDefinitionDocumentReader

Constructors

<init>

DefaultNamespaceHandlerResolver()

Create a new DefaultNamespaceHandlerResolver using the default mapping file location.

This constructor will result in the thread context ClassLoader being used to load resources.

DefaultNamespaceHandlerResolver(classLoader: ClassLoader)

Create a new DefaultNamespaceHandlerResolver using the default mapping file location.

DefaultNamespaceHandlerResolver(classLoader: ClassLoader, handlerMappingsLocation: String)

Create a new DefaultNamespaceHandlerResolver using the supplied mapping file location.

Properties

DEFAULT_HANDLER_MAPPINGS_LOCATION

static val DEFAULT_HANDLER_MAPPINGS_LOCATION: String

The location to look for the mapping files. Can be present in multiple JAR files.

Functions

resolve

open fun resolve(namespaceUri: String): NamespaceHandler

Locate the NamespaceHandler for the supplied namespace URI from the configured mappings.

toString

open fun toString(): String