Package org.n52.iceland.config.spring
Class ConfiguringBeanPostProcessor
java.lang.Object
org.n52.iceland.config.spring.ConfiguringBeanPostProcessor
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor
public class ConfiguringBeanPostProcessor
extends Object
implements org.springframework.beans.factory.config.BeanPostProcessor
Bean post processor, that
configures beans
using a
SettingsService bean. Configuration takes place after all
dependencies are injected, but before any initialization methods are called.
Note that all beans that are required to create the SettingsService
bean can not be processed.- Since:
- 1.0.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionpostProcessAfterInitialization(Object bean, String beanName) Noop implementation, will just returnbean.postProcessBeforeInitialization(Object bean, String beanName) Configures thebeanusing the settings service.voidsetSettingsService(SettingsService settingsService) Sets theSettingsManagerused to configure the beans.
-
Constructor Details
-
ConfiguringBeanPostProcessor
public ConfiguringBeanPostProcessor()
-
-
Method Details
-
setSettingsService
Sets theSettingsManagerused to configure the beans.- Parameters:
settingsService- the settings service
-
postProcessBeforeInitialization
Configures thebeanusing the settings service.- Specified by:
postProcessBeforeInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor- Parameters:
bean- the bean instancebeanName- the bean name- Returns:
- the bean
- Throws:
org.springframework.beans.factory.BeanInitializationException- if the configuration fails
-
postProcessAfterInitialization
Noop implementation, will just returnbean.- Specified by:
postProcessAfterInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor- Parameters:
bean- the bean instancebeanName- the bean name- Returns:
bean
-