类 DefaultNamespaceHandlerResolver
- java.lang.Object
- org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver
- 所有已实现的接口:
NamespaceHandlerResolver
public class DefaultNamespaceHandlerResolver extends Object implements NamespaceHandlerResolver
Default implementation of theNamespaceHandlerResolver
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 theDefaultNamespaceHandlerResolver(ClassLoader, String)
constructor.- 从以下版本开始:
- 2.0
- 作者:
- Rob Harrop, Juergen Hoeller
- 另请参阅:
NamespaceHandler
,DefaultBeanDefinitionDocumentReader
字段概要
字段 修饰符和类型 字段 说明 static String
DEFAULT_HANDLER_MAPPINGS_LOCATION
The location to look for the mapping files.protected Log
logger
Logger available to subclasses
构造器概要
构造器 构造器 说明 DefaultNamespaceHandlerResolver()
Create a newDefaultNamespaceHandlerResolver
using the default mapping file location.DefaultNamespaceHandlerResolver(ClassLoader classLoader)
Create a newDefaultNamespaceHandlerResolver
using the default mapping file location.DefaultNamespaceHandlerResolver(ClassLoader classLoader, String handlerMappingsLocation)
Create a newDefaultNamespaceHandlerResolver
using the supplied mapping file location.
字段详细资料
DEFAULT_HANDLER_MAPPINGS_LOCATION
public static final String DEFAULT_HANDLER_MAPPINGS_LOCATION
The location to look for the mapping files. Can be present in multiple JAR files.- 另请参阅:
- 常量字段值
构造器详细资料
DefaultNamespaceHandlerResolver
public DefaultNamespaceHandlerResolver()
Create a newDefaultNamespaceHandlerResolver
using the default mapping file location.This constructor will result in the thread context ClassLoader being used to load resources.
DefaultNamespaceHandlerResolver
public DefaultNamespaceHandlerResolver(ClassLoader classLoader)
Create a newDefaultNamespaceHandlerResolver
using the default mapping file location.- 参数:
classLoader
- theClassLoader
instance used to load mapping resources (may benull
, in which case the thread context ClassLoader will be used)- 另请参阅:
DEFAULT_HANDLER_MAPPINGS_LOCATION
DefaultNamespaceHandlerResolver
public DefaultNamespaceHandlerResolver(ClassLoader classLoader, String handlerMappingsLocation)
Create a newDefaultNamespaceHandlerResolver
using the supplied mapping file location.- 参数:
classLoader
- theClassLoader
instance used to load mapping resources may benull
, in which case the thread context ClassLoader will be used)handlerMappingsLocation
- the mapping file location
方法详细资料
resolve
public NamespaceHandler resolve(String namespaceUri)
Locate theNamespaceHandler
for the supplied namespace URI from the configured mappings.- 指定者:
resolve
在接口中NamespaceHandlerResolver
- 参数:
namespaceUri
- the relevant namespace URI- 返回:
- the located
NamespaceHandler
, ornull
if none found