1 Star 0 Fork 156

whipper86 / Spring-Analysis

forked from huifer / Code-Analysis 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Spring-BeanDefinitionDocumentReader.md 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
huifer 提交于 2020-12-22 12:37 . feat: v0.0.16

Spring BeanDefinitionDocumentReader

  • 类全路径: org.springframework.beans.factory.xml.BeanDefinitionDocumentReader

  • BeanDefinitionDocumentReader 作为接口本文仅介绍其定义的方法作用. 直接看类

public interface BeanDefinitionDocumentReader {

	/**
	 * Read bean definitions from the given DOM document and
	 * register them with the registry in the given reader context.
	 * 注册 bean 定义
	 * @param doc the DOM document
	 * @param readerContext the current context of the reader
	 * (includes the target registry and the resource being parsed)
	 * @throws BeanDefinitionStoreException in case of parsing errors
	 */
	void registerBeanDefinitions(Document doc, XmlReaderContext readerContext)
			throws BeanDefinitionStoreException;

}
  • 在方法中我们看到有两个参数

    1. Document
    2. XmlReaderContext 其中 Document 属于 xml 标准接口, 本系列不会对其进行介绍, XmlReaderContext 是 Spring 开发的类, 在本系列中有介绍, 详细内容请看这篇文章
  • 实现类分析: DefaultBeanDefinitionDocumentReader

Java
1
https://gitee.com/huangxinwhipper/spring-analysis.git
git@gitee.com:huangxinwhipper/spring-analysis.git
huangxinwhipper
spring-analysis
Spring-Analysis
master

搜索帮助