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
Obfuscator
field, constructor argument or method argument is annotated with anObfuscator
annotation likeObfuscateAll
,ObfuscateFixedLength
orObfuscateUsing
, the autowiredObfuscator
will match the annotation. - Otherwise, if a bean of type
Obfuscator
is available, that will be autowired. - Otherwise, a default
Obfuscator
will be autowired. This will be the result of callingObfuscator.fixedLength(3)
.
- Author:
- Rob Spoor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
postProcessBeanFactory
(ConfigurableListableBeanFactory beanFactory)
-
Constructor Details
-
ObfuscatorSupportBeanFactoryPostProcessor
public ObfuscatorSupportBeanFactoryPostProcessor()
-
-
Method Details
-
postProcessBeanFactory
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException - Specified by:
postProcessBeanFactory
in interfaceBeanFactoryPostProcessor
- Throws:
BeansException
-