Spring源码-SpringBoot-启动流程-02

总结摘要
SpringBoot启动流程02

分支流程 SpringApplication#prepareEnvironment

源码

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
// org.springframework.boot.SpringApplication#prepareEnvironment
private ConfigurableEnvironment prepareEnvironment(SpringApplicationRunListeners listeners,
        DefaultBootstrapContext bootstrapContext, ApplicationArguments applicationArguments) {
    // Create and configure the environment
    ConfigurableEnvironment environment = getOrCreateEnvironment();
    configureEnvironment(environment, applicationArguments.getSourceArgs());
    ConfigurationPropertySources.attach(environment);
    listeners.environmentPrepared(bootstrapContext, environment);
    DefaultPropertiesPropertySource.moveToEnd(environment);
    Assert.state(!environment.containsProperty("spring.main.environment-prefix"),
            "Environment prefix cannot be set via properties.");
    bindToSpringApplication(environment);
    if (!this.isCustomEnvironment) {
        EnvironmentConverter environmentConverter = new EnvironmentConverter(getClassLoader());
        environment = environmentConverter.convertEnvironmentIfNecessary(environment, deduceEnvironmentClass());
    }
    ConfigurationPropertySources.attach(environment);
    return environment;
}

流程

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// org.springframework.boot.SpringApplication#prepareEnvironment
// 构建 Environment
--> 创建`Environment`。
    --|> `org.springframework.boot.SpringApplication#getOrCreateEnvironment`
    --> WebApplicationType.SERVLET 类型调用`org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext.Factory#createEnvironment`。
        --> new ApplicationServletEnvironment()
        --|> org.springframework.boot.web.servlet.context.ApplicationServletEnvironment
---> 配置`Environment`。
    --|> `org.springframework.boot.SpringApplication#configureEnvironment`
    --> 创建`ApplicationConversionService`并填充到`environment`,即填充到`AbstractEnvironment#propertyResolver`。
        --|> org.springframework.boot.convert.ApplicationConversionService#ApplicationConversionService()
        --|> 默认`ApplicationConversionService`内包含`org.springframework.core.convert.converter.Converter``org.springframework.format.Formatter`,不包含`java.beans.PropertyEditor`,
        --> 配置转换器org.springframework.boot.convert.ApplicationConversionService#configure
            --> org.springframework.core.convert.support.DefaultConversionService#addDefaultConverters
                --|> 注册`*Converter`,包括
                    --> ScalarConverters
                    --> CollectionConverters
                    --> xxxConverters
            --> org.springframework.format.support.DefaultFormattingConversionService#addDefaultFormatters
                --|> 注册`*Formatter`。
            --> org.springframework.boot.convert.ApplicationConversionService#addApplicationFormatters
                --|> 注册 Spring Boot 相关的`*Formatter`。
            --> org.springframework.boot.convert.ApplicationConversionService#addApplicationConverters
                --|> 注册 Spring Boot 相关的`*Converter`。
            --> 后续逻辑会将其填充到 BeanFactory 
                --> org.springframework.boot.SpringApplication#postProcessApplicationContext
                    --> context.getBeanFactory().setConversionService(context.getEnvironment().getConversionService());
    --> 配置`PropertySource`并填充到`environment`。
    --> 配置`Profile`并填充到`environment`。空逻辑跳过
--> 封装和添加`ConfigurationPropertySourcesPropertySource`。
    --|> `org.springframework.boot.context.properties.source.ConfigurationPropertySources#attach`
    --|> 将当前的`MutablePropertySources`封装为`SpringConfigurationPropertySources`,并再次封装为支持参数解析的`ConfigurationPropertySourcesPropertySource`,名称为`ATTACHED_PROPERTY_SOURCE_NAME = "configurationProperties"`,添加到`MutablePropertySources`中并且优先级最高
--> 发布`ApplicationEnvironmentPreparedEvent`。
    --|> `listeners.environmentPrepared(bootstrapContext, environment);`
    --> 生效的`listener`如下
    --|> EnvironmentPostProcessorApplicationListener
        --> 加载`org.springframework.boot.env.EnvironmentPostProcessor`
            --|> `org.springframework.boot.env.EnvironmentPostProcessorApplicationListener#getEnvironmentPostProcessors`。
            --|> `EnvironmentPostProcessorApplicationListener`使用无参构建方法创建
                --> 构造方法为`this(EnvironmentPostProcessorsFactory::fromSpringFactories, new DeferredLogs());`。
            --> 创建`EnvironmentPostProcessorsFactory`,`EnvironmentPostProcessorsFactory::fromSpringFactories`。
                --> 加载`EnvironmentPostProcessor`,默认有7个
                --|> `SpringFactoriesLoader.loadFactoryNames(EnvironmentPostProcessor.class, classLoader));`
                --> 创建`ReflectionEnvironmentPostProcessorsFactory`。
                --|> 作用是反射创建实例配置参数`DeferredLogFactory`、`ConfigurableBootstrapContext`
            --> 使用该`EnvironmentPostProcessorsFactory`(`ReflectionEnvironmentPostProcessorsFactory`)实例化`EnvironmentPostProcessor`。
                --|> 均使用`DeferredLog`作为`logger`。
        --> 调用接口方法`org.springframework.boot.env.EnvironmentPostProcessor#postProcessEnvironment`。
            --|> 上一步骤默认创建7个分别如下
            --|> RandomValuePropertySourceEnvironmentPostProcessor
                --|> 添加`RandomValuePropertySource``MutablePropertySources`,相当于也同步添加到了`ConfigurationPropertySourcesPropertySource`
            --|> SystemEnvironmentPropertySourceEnvironmentPostProcessor
                --|> An EnvironmentPostProcessor that replaces the systemEnvironment SystemEnvironmentPropertySource with an SystemEnvironmentPropertySourceEnvironmentPostProcessor.OriginAwareSystemEnvironmentPropertySource that can track the SystemEnvironmentOrigin for every system environment property.
                --|> 用1个`SystemEnvironmentPropertySourceEnvironmentPostProcessor.OriginAwareSystemEnvironmentPropertySource`替换`SystemEnvironmentPropertySource`。
            --|> SpringApplicationJsonEnvironmentPostProcessor
                --|> An EnvironmentPostProcessor that parses JSON from spring. application. json or equivalently SPRING_APPLICATION_JSON and adds it as a map property source to the Environment. The new properties are added with higher priority than the system properties.
                --|> 一个 EnvironmentPostProcessor它解析来自 spring.application.json 或等效的 SPRING_APPLICATION_JSON  JSON并将其作为映射属性源添加到环境中新添加的属性优先级高于系统属性
            --|> CloudFoundryVcapEnvironmentPostProcessor
            --|> ConfigDataEnvironmentPostProcessor
                --|> EnvironmentPostProcessor that loads and applies ConfigData to Spring's Environment.
                --|> 用于加载并应用 ConfigData  Spring  Environment 
            --|> DebugAgentEnvironmentPostProcessor
            --|> IntegrationPropertiesEnvironmentPostProcessor
    --|> AnsiOutputApplicationListener配置日志 ANSI 特性
    --|> LoggingApplicationListener
        --|> An ApplicationListener that configures the LoggingSystem. If the environment contains a logging. config property it will be used to bootstrap the logging system, otherwise a default configuration is used.
        --|> 用于配置日志系统如果环境中包含 logging.config 属性它将被用来初始化日志系统否则将使用默认配置
            --> org.springframework.boot.context.logging.LoggingApplicationListener#initialize
    --|> BackgroundPreinitializer
        --|> ApplicationListener to trigger early initialization in a background thread of time-consuming tasks.
        --> 不了解为何将其作为耗时操作org.springframework.boot.autoconfigure.BackgroundPreinitializer#performPreinitialization
    --|> DelegatingApplicationListener默认未起作用
    --|> FileEncodingApplicationListener默认未起作用
--> org.springframework.boot.SpringApplication#bindToSpringApplication
    --|> `spring.main`相关的配置绑定到`SpringApplication`

ConfigDataEnvironmentPostProcessor 详解

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor#postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment, org.springframework.boot.SpringApplication)
--> org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor#postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment, org.springframework.core.io.ResourceLoader, java.util.Collection<java.lang.String>)
    --> new DefaultResourceLoader();
        --|> org.springframework.core.io.DefaultResourceLoader#DefaultResourceLoader()
    --> org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor#getConfigDataEnvironment
        --> new ConfigDataEnvironment(
            --|> org.springframework.boot.context.config.ConfigDataEnvironment#ConfigDataEnvironment
            --|> 默认搜索路径`locations``"optional:classpath:/;optional:classpath:/config/"``"optional:file:./;optional:file:./config/;optional:file:./config/*/"`。通过使用
            --> 构建`Binder`,`org.springframework.boot.context.properties.bind.Binder#get(org.springframework.core.env.Environment)`。
                --> `ConfigurationPropertySources.get(environment);`
                --> new PropertySourcesPlaceholdersResolver(environment)
                    --> new PropertyPlaceholderHelper
                --> `new Binder(sources, placeholdersResolver, null, null, defaultBindHandler);`,`defaultBindHandler`同样为 null
                    --|> org.springframework.boot.context.properties.bind.Binder#Binder(java.lang.Iterable<org.springframework.boot.context.properties.source.ConfigurationPropertySource>, org.springframework.boot.context.properties.bind.PlaceholdersResolver, org.springframework.core.convert.ConversionService, java.util.function.Consumer<org.springframework.beans.PropertyEditorRegistry>, org.springframework.boot.context.properties.bind.BindHandler)
                        --> org.springframework.boot.context.properties.bind.Binder#Binder(java.lang.Iterable<org.springframework.boot.context.properties.source.ConfigurationPropertySource>, org.springframework.boot.context.properties.bind.PlaceholdersResolver, org.springframework.core.convert.ConversionService, java.util.function.Consumer<org.springframework.beans.PropertyEditorRegistry>, org.springframework.boot.context.properties.bind.BindHandler, org.springframework.boot.context.properties.bind.BindConstructorProvider)
                            --> org.springframework.boot.context.properties.bind.Binder#Binder(java.lang.Iterable<org.springframework.boot.context.properties.source.ConfigurationPropertySource>, org.springframework.boot.context.properties.bind.PlaceholdersResolver, org.springframework.core.convert.ConversionService, java.util.function.Consumer<org.springframework.beans.PropertyEditorRegistry>, org.springframework.boot.context.properties.bind.BindHandler, org.springframework.boot.context.properties.bind.BindConstructorProvider)
                                --> org.springframework.boot.context.properties.bind.BindConverter#get
                                    --> 当前`conversionServices``propertyEditorInitializer`均为空因此`BindConverter`获取默认转换器包含`Converter``PropertyEditor`两大类
                                        --|> org.springframework.boot.context.properties.bind.BindConverter#getSharedInstance
                                        --> new BindConverter(null, null);
                                            --|> org.springframework.boot.context.properties.bind.BindConverter#BindConverter
                                            --> new TypeConverterConversionService(propertyEditorInitializer)
                                                --> new TypeConverterConverter(initializer)
                                                    --|> org.springframework.boot.context.properties.bind.BindConverter.TypeConverterConverter#TypeConverterConverter
                                                    --> createTypeConverter()
                                                        --|> org.springframework.boot.context.properties.bind.BindConverter.TypeConverterConverter#createTypeConverter
                                                        --> new SimpleTypeConverter()
                                                            --> new TypeConverterDelegate(this);
                                                                --|> org.springframework.beans.TypeConverterDelegate#TypeConverterDelegate(org.springframework.beans.PropertyEditorRegistrySupport)
                                                            --> registerDefaultEditors()
                                            --> ApplicationConversionService.getSharedInstance()
                                                --|> org.springframework.boot.convert.ApplicationConversionService#getSharedInstance
                                                --> new ApplicationConversionService(null, true);
                                                    --|> org.springframework.boot.convert.ApplicationConversionService#ApplicationConversionService(org.springframework.util.StringValueResolver, boolean)
                                                    --> org.springframework.boot.convert.ApplicationConversionService#configure
                                                        --|> 批量注册`Converter``Formatter`。
                                
                                --> 使用`BindConstructorProvider.DEFAULT`。
                                --> 两种 Binder `ValueObjectBinder``JavaBeanBinder`。
            --> logger `DeferredLogs`。
            --> createConfigDataLocationResolvers(
                --|> org.springframework.boot.context.config.ConfigDataEnvironment#createConfigDataLocationResolvers
                    --> new ConfigDataLocationResolvers(
                        --|> org.springframework.boot.context.config.ConfigDataLocationResolvers
                            --> 获取`ConfigDataLocationResolver.class`实现类,`SpringFactoriesLoader.loadFactoryNames(ConfigDataLocationResolver.class`。
                            --> org.springframework.boot.context.config.ConfigDataLocationResolvers#ConfigDataLocationResolvers(org.springframework.boot.logging.DeferredLogFactory, org.springframework.boot.ConfigurableBootstrapContext, org.springframework.boot.context.properties.bind.Binder, org.springframework.core.io.ResourceLoader, java.util.List<java.lang.String>)
                                --> 填充`DeferredLogFactory.class`等信息
                                --> 实例化`ConfigDataLocationResolver.class`实现类默认2个有序排列为`ConfigTreeConfigDataLocationResolver``StandardConfigDataLocationResolver`。
                                    --> ConfigTreeConfigDataLocationResolver
                                    --> StandardConfigDataLocationResolver
                                        --> SpringFactoriesLoader.loadFactories(PropertySourceLoader.class
                                            --|> 获取并实例化`PropertySourceLoader.class`实现类
                                            --|> 默认支持如下2种
                                            --|> PropertiesPropertySourceLoader 支持查找`properties``xml`。
                                            --|> YamlPropertySourceLoader 支持查找`yml``yaml` 
            --> 入参`this.environmentUpdateListener`为空使用默认空实现`ConfigDataEnvironmentUpdateListener.NONE`,无逻辑
                --|> 该类监听器响应2种事件分别为
                --|> `onPropertySourceAdded`,属性源添加事件
                --|> `onSetProfiles`,profile 设置事件
            --> new ConfigDataLoaders(
                --> SpringFactoriesLoader.loadFactoryNames(ConfigDataLoader.class, classLoader))
                    --|> 获取并实例化`ConfigDataLoader.class`实现类
                        --|> 默认支持如下2种
                        --|> ConfigTreeConfigDataLoader
                        --|> StandardConfigDataLoader
            --> `createContributors(binder);`
                --|> org.springframework.boot.context.config.ConfigDataEnvironment#createContributors(org.springframework.boot.context.properties.bind.Binder)
                --> for-each 遍历 propertySources封装为`ConfigDataEnvironmentContributor`
                    --|> 此处忽略名称为`defaultProperties` propertySource后续封装应当是为了适配优先级
                    --> ConfigDataEnvironmentContributor.ofExisting(propertySource)
                        --|> 类型为`org.springframework.boot.context.config.ConfigDataEnvironmentContributor.Kind#EXISTING`。
                --> 添加若干个初始`ImportContributor`。
                    --|> 类型为`org.springframework.boot.context.config.ConfigDataEnvironmentContributor.Kind#INITIAL_IMPORT`。
                    --|> 对应配置参数如下
                    --> spring.config.import
                    --> spring.config.additional-location
                    --> spring.config.location
                        --|> 默认搜索路径如下
                        --> "optional:classpath:/;optional:classpath:/config/"
                        --> "optional:file:./;optional:file:./config/;optional:file:./config/*/"
                --> 如果存在则将名称为`defaultProperties` propertySource 封装为`ConfigDataEnvironmentContributor`。
        --> org.springframework.boot.context.config.ConfigDataEnvironment#processAndApply
            --> `new ConfigDataImporter(`
                --|> Imports ConfigData by resolving and loading locations. resources are tracked to ensure that they are not imported multiple times.
                --|> 通过解析和加载位置来导入配置数据跟踪资源以确保它们不会被多次导入
                --> 使用`DeferredLogs`,`ConfigDataLocationResolvers`,`ConfigDataLoaders`
            --> `bootstrapContext`中注册`org.springframework.boot.context.properties.bind.Binder`为原型 bean
            --> `processInitial(`
            --> 创建`ConfigDataActivationContext`。`createActivationContext(`
            --> 加载与 profile 无关的配置文件。`processWithoutProfiles(`
            --> 再次创建`ConfigDataActivationContext`。`withProfiles(`
            --> 加载制定 profile 的配置文件。`processWithProfiles(`
            --> 应用到 environment 。`applyToEnvironment(`

默认将使用StandardConfigDataLoaderPropertiesPropertySourceLoader加载配置文件。

PropertySource

PropertySource 相关类

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
`org.springframework.boot.context.properties.source.SpringConfigurationPropertySources`
Adapter to convert Spring's MutablePropertySources to ConfigurationPropertySources.
适配器,用于将 Spring 的 `MutablePropertySources` 转换为 `ConfigurationPropertySources`。

`org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource`
PropertySource that exposes ConfigurationPropertySource instances so that they can be used with a PropertyResolver or added to the Environment.
属性源,用于公开 ConfigurationPropertySource 实例,以便它们可以与 PropertyResolver 一起使用,或添加到环境中。

`org.springframework.core.env.PropertySource`重写了`equals`方法,判断方式为比较`name`,另外提供了`org.springframework.core.env.PropertySource.ComparisonPropertySource`类型的占位`PropertySource`仅用于比较。
这样可保持风格统一。
当需要根据`name`查找时,可调用`this.propertySourceList.indexOf`方法查询,不需要另外提供一个根据名称查询的方法。

PropertySource 流程

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext.Factory#createEnvironment
--> new ApplicationServletEnvironment();
    --|> org.springframework.boot.web.servlet.context.ApplicationServletEnvironment
    --> org.springframework.web.context.support.StandardServletEnvironment#StandardServletEnvironment()
        --> org.springframework.core.env.StandardEnvironment#StandardEnvironment()
            --> org.springframework.core.env.AbstractEnvironment#AbstractEnvironment()
                --> org.springframework.core.env.AbstractEnvironment#AbstractEnvironment(org.springframework.core.env.MutablePropertySources)
                    --> 默认使用`MutablePropertySources`组合多个其它类型`PropertySources`。
                    --> 创建 PropertyResolver
                    --> 配置`propertySources`,默认添加4个优先级递减为`servletConfigInitParams`,`servletContextInitParams`,`systemProperties`,`systemEnvironment`。
                        --|> org.springframework.web.context.support.StandardServletEnvironment#customizePropertySources
                        --|> 当前类默认添加如下2个`PropertySource`,当前为占位的空`PropertySource`。默认不会添加 JNDI 相关 PropertySource
                        --> new StubPropertySource(SERVLET_CONFIG_PROPERTY_SOURCE_NAME)
                        --> new StubPropertySource(SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)
                        --> org.springframework.core.env.StandardEnvironment#customizePropertySources
                            --|> 该类默认添加如下2个`PropertySource`,当前为真实有效的`PropertySource`,信息来源于系统配置
                            --> new PropertiesPropertySource(SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME, getSystemProperties())
                                --> getSystemProperties()
                                    --|> org.springframework.core.env.AbstractEnvironment#getSystemProperties
                                    --> (Map) System.getProperties()
                            --> new SystemEnvironmentPropertySource(SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME, getSystemEnvironment())
                                --> getSystemEnvironment()
                                    --|> org.springframework.core.env.AbstractEnvironment#getSystemEnvironment
                                    --> (Map) System.getenv()

加载用户配置文件的相关逻辑

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
// 加载用户配置文件的相关逻辑
--> org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor#postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment, org.springframework.boot.SpringApplication)
    --> org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor#postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment, org.springframework.core.io.ResourceLoader, java.util.Collection<java.lang.String>)
        --> org.springframework.boot.context.config.ConfigDataEnvironment#processAndApply
            --> processInitial(this.contributors, importer);
                --|> org.springframework.boot.context.config.ConfigDataEnvironment#processInitial
            --> processWithoutProfiles(contributors, importer, activationContext);
                --|> org.springframework.boot.context.config.ConfigDataEnvironment#processWithoutProfiles
            --> processWithProfiles(contributors, importer, activationContext);
                --|> org.springframework.boot.context.config.ConfigDataEnvironment#processWithProfiles
            --> applyToEnvironment
                --|> org.springframework.boot.context.config.ConfigDataEnvironment#applyToEnvironment
1
2
3
4
5
// org.springframework.boot.context.config.ConfigDataEnvironmentContributors#withProcessedImports
--> 获取`ImportPhase`,当前为`BEFORE_PROFILE_ACTIVATION`,`ImportPhase.get(activationContext)`。
--> while-true 
    --> org.springframework.boot.context.config.ConfigDataEnvironmentContributors#getNextToProcess
        --> for-each contributors遍历`contributors`,返回第一个符合条件的`contributor`。

参数解析

1
2
3
4
5
6
7
org.springframework.util.PropertyPlaceholderHelper
Utility class for working with Strings that have placeholder values in them. A placeholder takes the form ${name}. Using PropertyPlaceholderHelper these placeholders can be substituted for user-supplied values.
Values for substitution can be supplied using a Properties instance or using a PropertyPlaceholderHelper.PlaceholderResolver.
用于处理包含占位符值的字符串的工具类占位符的格式为 `${name}`。通过使用 `PropertyPlaceholderHelper`,这些占位符可以用用户提供的值进行替换替换值可以通过 `Properties` 实例或通过 `PropertyPlaceholderHelper.PlaceholderResolver` 提供

org.springframework.boot.context.properties.bind.PropertySourcesPlaceholdersResolver
`PropertySourcesPlaceholdersResolver`委托`PropertyPlaceholderHelper`实现并提供了`PropertyPlaceholderHelper`所需的`PlaceholderResolver`实现用于从`PropertySource`中获取属性

类型转换与绑定

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29


org.springframework.boot.context.properties.bind.BindConverter
当前`conversionServices``propertyEditorInitializer`均为空因此`BindConverter`获取默认转换器包含`Converter``PropertyEditor`两大类
当前未传递参数`conversionServices```,因此使用默认的`BindConverter#sharedInstance`,`BindConverter`。
1. 委托`TypeConverterConversionService`-->委托`TypeConverterConverter`-->委托`SimpleTypeConverter`(`defaultEditorsActive``true`,将注册默认`PropertyEditor`)。
2. 委托`org.springframework.boot.convert.ApplicationConversionService#sharedInstance`,`ApplicationConversionService`,内部批量注册`Converter``Formatter`。

org.springframework.boot.context.properties.bind.Binder
A container object which Binds objects from one or more ConfigurationPropertySources.
一个容器对象用于从一个或多个 ConfigurationPropertySource 绑定对象
支持`ConversionService``PropertyEditor`。


org.springframework.boot.context.properties.bind.BindConstructorProvider
Strategy interface used to determine a specific constructor to use when binding.
用于确定绑定时使用的特定构造函数的策略接口
org.springframework.boot.context.properties.bind.DefaultBindConstructorProvider
Default BindConstructorProvider implementation.
默认的 `BindConstructorProvider` 实现
org.springframework.boot.context.properties.ConfigurationPropertiesBindConstructorProvider
BindConstructorProvider used when binding @ConfigurationProperties.
在绑定 `@ConfigurationProperties` 时使用的 `BindConstructorProvider`。



org.springframework.boot.context.properties.bind.BindConverter
Utility to handle any conversion needed during binding. This class is not thread-safe and so a new instance is created for each top-level bind.
用于处理绑定过程中所需的任何转换的工具类此类不是线程安全的因此每个顶级绑定都会创建一个新的实例

END