Class DiscriminatedConfigurationPropertiesBeanPostProcessor
java.lang.Object
com.broadleafcommerce.common.extension.environment.DiscriminatedConfigurationPropertiesBeanPostProcessor
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor
public class DiscriminatedConfigurationPropertiesBeanPostProcessor
extends Object
implements org.springframework.beans.factory.config.BeanPostProcessor
BeanPostProcessor that identifies components annotated with
ConfigurationProperties
and
sets up a proxy that circumvents the default property handling in favor of dynamic retrieval from
the Spring environment. Furthermore, the property name may be embellished with tenant related
information, if applicable, harvested from the current request context. This allows for
discriminated property retrieval as defined by DiscriminatedPropertyAccessor
. Lastly,
this property handling is sensitive to config server environment refresh, by virtue of direct
interaction with the environment. Note a cache is employed that is invalidated upon config server
refresh.-
Constructor Summary
ConstructorDescriptionDiscriminatedConfigurationPropertiesBeanPostProcessor
(DiscriminatedConfigurationPropertiesMethodCallProcessor processor, List<DiscriminatedPropertyIncludeFilterSupplier> includeFilters, List<DiscriminatedPropertyExcludeFilterSupplier> excludeFilters) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.config.BeanPostProcessor
postProcessBeforeInitialization
-
Constructor Details
-
DiscriminatedConfigurationPropertiesBeanPostProcessor
public DiscriminatedConfigurationPropertiesBeanPostProcessor(DiscriminatedConfigurationPropertiesMethodCallProcessor processor, List<DiscriminatedPropertyIncludeFilterSupplier> includeFilters, List<DiscriminatedPropertyExcludeFilterSupplier> excludeFilters)
-
-
Method Details
-
postProcessAfterInitialization
public Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException - Specified by:
postProcessAfterInitialization
in interfaceorg.springframework.beans.factory.config.BeanPostProcessor
- Throws:
org.springframework.beans.BeansException
-