java.lang.Object
dev.orne.config.spring.ConfigProviderConfigurer
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.config.BeanFactoryPostProcessor,org.springframework.beans.factory.config.BeanPostProcessor,org.springframework.context.EnvironmentAware
@API(status=INTERNAL,
since="1.0")
public class ConfigProviderConfigurer
extends Object
implements org.springframework.context.EnvironmentAware, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.beans.factory.config.BeanPostProcessor
Bean factory post processor that provides a
ConfigProvider
customized per Spring context configuration.- Since:
- 1.0
- Version:
- 1.0, 2025-11
- Author:
- (w) Iker Hernaez
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe application provided configuration provider bean name.static final StringThe name of the automaticConfigbean.static final StringThe name of the automaticConfigProviderbean.protected org.springframework.beans.factory.ListableBeanFactoryThe bean factory.protected ConfigProviderThe configuration provider.protected StringThe application provided configuration provider customizer bean name.protected org.springframework.core.env.EnvironmentThe Spring environment.protected ConfigProviderImplThe created configuration provider. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull ConfigProviderImplCreates a new configuration provider.protected @NotNull ConfigCreates a Spring based default configuration.@NotNull ConfigProviderCreates and exposes the automatically createdConfigbean, if any.@NotNull ObjectpostProcessAfterInitialization(@NotNull Object bean, @NotNull String beanName) RegistersvoidpostProcessBeanFactory(@NotNull org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) Detects application providedConfigProviderandConfigProviderCustomizerbeans.voidsetEnvironment(org.springframework.core.env.Environment environment) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.config.BeanPostProcessor
postProcessBeforeInitialization
-
Field Details
-
AUTO_CONFIG
The name of the automaticConfigbean.- See Also:
-
AUTO_CONFIG_PROVIDER
The name of the automaticConfigProviderbean.- See Also:
-
environment
protected org.springframework.core.env.Environment environmentThe Spring environment. -
beanFactory
protected org.springframework.beans.factory.ListableBeanFactory beanFactoryThe bean factory. -
appConfigProviderBeanName
The application provided configuration provider bean name. -
customizerBeanName
The application provided configuration provider customizer bean name. -
configProvider
The configuration provider. -
ownConfigProvider
The created configuration provider.
-
-
Constructor Details
-
ConfigProviderConfigurer
public ConfigProviderConfigurer()Creates a new instance.
-
-
Method Details
-
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment) - Specified by:
setEnvironmentin interfaceorg.springframework.context.EnvironmentAware
-
postProcessBeanFactory
public void postProcessBeanFactory(@NotNull @NotNull org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException Detects application providedConfigProviderandConfigProviderCustomizerbeans.- Specified by:
postProcessBeanFactoryin interfaceorg.springframework.beans.factory.config.BeanFactoryPostProcessor- Throws:
org.springframework.beans.BeansException
-
postProcessAfterInitialization
@NotNull public @NotNull Object postProcessAfterInitialization(@NotNull @NotNull Object bean, @NotNull @NotNull String beanName) throws org.springframework.beans.BeansException Registers- Specified by:
postProcessAfterInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor- Throws:
org.springframework.beans.BeansException
-
getConfigProvider
Creates and exposes the automatically createdConfigbean, if any.- Returns:
- The automatically created
ConfigProviderbean.
-
createConfigProvider
Creates a new configuration provider.- Returns:
- The new configuration provider.
-
createDefaultConfig
Creates a Spring based default configuration.- Returns:
- The default configuration.
-