接口的使用
org.springframework.boot.context.properties.source.ConfigurationPropertySource
程序包
说明
Support for
@ConfigurationProperties binding.General
BindHandler implementations.Sources for external configuration properties.
-
org.springframework.boot.context.properties.bind中ConfigurationPropertySource的使用
限定符构造器说明Binder(ConfigurationPropertySource... sources) Create a newBinderinstance for the specified sources.限定符构造器说明Binder(Iterable<ConfigurationPropertySource> sources) Create a newBinderinstance for the specified sources.Binder(Iterable<ConfigurationPropertySource> sources, PlaceholdersResolver placeholdersResolver) Create a newBinderinstance for the specified sources.Binder(Iterable<ConfigurationPropertySource> sources, PlaceholdersResolver placeholdersResolver, List<ConversionService> conversionServices, Consumer<PropertyEditorRegistry> propertyEditorInitializer, BindHandler defaultBindHandler, BindConstructorProvider constructorProvider) Create a newBinderinstance for the specified sources.Binder(Iterable<ConfigurationPropertySource> sources, PlaceholdersResolver placeholdersResolver, ConversionService conversionService) Create a newBinderinstance for the specified sources.Binder(Iterable<ConfigurationPropertySource> sources, PlaceholdersResolver placeholdersResolver, ConversionService conversionService, Consumer<PropertyEditorRegistry> propertyEditorInitializer) Create a newBinderinstance for the specified sources.Binder(Iterable<ConfigurationPropertySource> sources, PlaceholdersResolver placeholdersResolver, ConversionService conversionService, Consumer<PropertyEditorRegistry> propertyEditorInitializer, BindHandler defaultBindHandler) Create a newBinderinstance for the specified sources.Binder(Iterable<ConfigurationPropertySource> sources, PlaceholdersResolver placeholdersResolver, ConversionService conversionService, Consumer<PropertyEditorRegistry> propertyEditorInitializer, BindHandler defaultBindHandler, BindConstructorProvider constructorProvider) Create a newBinderinstance for the specified sources. -
org.springframework.boot.context.properties.bind.handler中ConfigurationPropertySource的使用
限定符构造器说明NoUnboundElementsBindHandler(BindHandler parent, Function<ConfigurationPropertySource, Boolean> filter) -
org.springframework.boot.context.properties.source中ConfigurationPropertySource的使用
修饰符和类型类说明classAConfigurationPropertySourcebacked by aMapand using standard name mapping rules.修饰符和类型方法说明default ConfigurationPropertySourceConfigurationPropertySource.filter(Predicate<ConfigurationPropertyName> filter) Return a filtered variant of this source, containing only names that match the givenPredicate.static ConfigurationPropertySourceConfigurationPropertySource.from(PropertySource<?> source) Return a single newConfigurationPropertySourceadapted from the given SpringPropertySourceornullif the source cannot be adapted.ConfigurationProperty.getSource()Return theConfigurationPropertySourcethat provided the property ornullif the source is unknown.default ConfigurationPropertySourceConfigurationPropertySource.withAliases(ConfigurationPropertyNameAliases aliases) Return a variant of this source that supports name aliases.default ConfigurationPropertySourceConfigurationPropertySource.withPrefix(String prefix) Return a variant of this source that supports a prefix.修饰符和类型方法说明static Iterable<ConfigurationPropertySource> ConfigurationPropertySources.from(Iterable<PropertySource<?>> sources) ReturnIterablecontaining newConfigurationPropertySourceinstances adapted from the given SpringPropertySources.static Iterable<ConfigurationPropertySource> ConfigurationPropertySources.from(PropertySource<?> source) ReturnIterablecontaining a single newConfigurationPropertySourceadapted from the given SpringPropertySource.static Iterable<ConfigurationPropertySource> ConfigurationPropertySources.get(Environment environment) Return a set ofConfigurationPropertySourceinstances that have previously beenattachedto theEnvironment.修饰符和类型方法说明UnboundElementsSourceFilter.apply(ConfigurationPropertySource configurationPropertySource) 修饰符和类型方法说明static ConfigurationPropertyCachingConfigurationPropertyCaching.get(Iterable<ConfigurationPropertySource> sources) Get for all specified configuration property sources.static ConfigurationPropertyCachingConfigurationPropertyCaching.get(Iterable<ConfigurationPropertySource> sources, Object underlyingSource) Get for a specific configuration property source in the specified configuration property sources.