spring xml 命名空间关系

最近仔细看了一下spring 加载xml的流程,其中漏掉的一个环境,就是命名空间与类解析对应上的一个环节就在于:
org.springframework.beans.factory.xml.NamespaceHandlerResolver.resolve(String)
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(Element, BeanDefinition)



org.springframework.beans.factory.xml.XmlReaderContext.getNamespaceHandlerResolver(){
this.namespaceHandlerResolver to string :以下
}

NamespaceHandlerResolverusingmappings{
http://www.springframework.org/schema/jdbc=org.springframework.jdbc.config.JdbcNamespaceHandler
http://www.springframework.org/schema/security/oauth2=org.springframework.security.oauth2.config.xml.OAuth2SecurityNamespaceHandler
http://www.springframework.org/schema/c=org.springframework.beans.factory.xml.SimpleConstructorNamespaceHandler
http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler
http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler
http://www.springframework.org/schema/mvc=org.springframework.web.servlet.config.MvcNamespaceHandler
http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring=com.googlecode.ehcache.annotations.config.AnnotationDrivenEhCacheNamespaceHandler
http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler
http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler

http://www.springframework.org/schema/cache=org.springframework.cache.config.CacheNamespaceHandler
http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler
http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler
http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler
http://www.springframework.org/schema/security=org.springframework.security.config.SecurityNamespaceHandler
http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler}

猜你喜欢

转载自gelongmei.iteye.com/blog/2200022