Class ObfuscatorSupportBeanFactoryPostProcessor
java.lang.Object
com.github.robtimus.obfuscation.spring.ObfuscatorSupportBeanFactoryPostProcessor
- All Implemented Interfaces:
BeanFactoryPostProcessor
public class ObfuscatorSupportBeanFactoryPostProcessor
extends Object
implements BeanFactoryPostProcessor
A
BeanFactoryPostProcessor that adds support for autowiring Obfuscator instances.
If an instance of this class is activated, it will allow instances of Obfuscator to be autowired.
The type of Obfuscator is determined as follows:
- If the
Obfuscatorfield, constructor argument or method argument is annotated with anObfuscatorannotation likeObfuscateAll,ObfuscateFixedLengthorObfuscateUsing, the autowiredObfuscatorwill match the annotation. - Otherwise, if a bean of type
Obfuscatoris available, that will be autowired. - Otherwise, a default
Obfuscatorwill be autowired. This will be the result of callingObfuscator.fixedLength(3).
- Author:
- Rob Spoor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpostProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
-
Constructor Details
-
ObfuscatorSupportBeanFactoryPostProcessor
public ObfuscatorSupportBeanFactoryPostProcessor()
-
-
Method Details
-
postProcessBeanFactory
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException - Specified by:
postProcessBeanFactoryin interfaceBeanFactoryPostProcessor- Throws:
BeansException
-