Springboot 学习之 PropertySource、PropertySources、PropertyResolver、PropertySourceLoader 之间关系
接口 | 功能 | 支持 |
---|---|---|
PropertySource | 以 name-source 形式,持有一组配置信息 | Map、Properties、Command、ServletConfig、ServletContext 等等 |
PropertySources | 持有多个 PropertySource 配置,可动态增加、删除、修改所持有的 PropertySource 配置的数量及配置 | |
PropertyResolver | 负责对外提供所持有 PropertySource 属性的访问及解析 | 1、属性获取 2、Placeholder 占位符处理 |
PropertySourceLoader | 负责加载 resource 资源文件,生成 PropertySource | 1、yml , yaml 2、 properties , xml |