Hello Marten, thank you very much for your response:

Originally Posted by
Marten Deinum
That is what I figured would happen (although the flow is a bit different then you are explaining here

). But the general idea is the same.
Dependency injections happens AFTER the BeanFactoryPostProcessor have fired. BeanFactoryPostProcessors operate on BeanDefinitions as they fire there are no instances yet only configuration meta data.
I don't understand this... I've been debugging the ApplicationContext initilization process and the Resource gets created using the (previously registered) ResourceEditor, and injects it in the PropertyPlaceHolderConfigurer...
I'm sure there's something I don't grasp here, but the call stack for the resource creation is this (sorry for dumping the stack trace, but I don't figure a better way of explaining :-) )
Code:
GenericApplicationContext(DefaultResourceLoader).getResource(String) line: 90
GenericApplicationContext.getResource(String) line: 179
ResourceEditor.setAsText(String) line: 74
TypeConverterDelegate.doConvertTextValue(Object, String, PropertyEditor) line: 382
TypeConverterDelegate.doConvertValue(Object, Object, Class, PropertyEditor) line: 358
TypeConverterDelegate.convertIfNecessary(String, Object, Object, Class, PropertyDescriptor, MethodParameter) line: 173
TypeConverterDelegate.convertIfNecessary(Object, Object, PropertyDescriptor) line: 138
BeanWrapperImpl.convertForProperty(Object, String) line: 386
DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).convertForProperty(Object, String, BeanWrapper, TypeConverter) line: 1289
DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).applyPropertyValues(String, BeanDefinition, BeanWrapper, PropertyValues) line: 1250
DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).populateBean(String, AbstractBeanDefinition, BeanWrapper) line: 1010
DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).doCreateBean(String, RootBeanDefinition, Object[]) line: 472
AbstractAutowireCapableBeanFactory$1.run() line: 409
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).createBean(String, RootBeanDefinition, Object[]) line: 380
AbstractBeanFactory$1.getObject() line: 264
DefaultListableBeanFactory(DefaultSingletonBeanRegistry).getSingleton(String, ObjectFactory) line: 222
DefaultListableBeanFactory(AbstractBeanFactory).doGetBean(String, Class, Object[], boolean) line: 261
DefaultListableBeanFactory(AbstractBeanFactory).getBean(String, Class, Object[]) line: 185
DefaultListableBeanFactory(AbstractBeanFactory).getBean(String) line: 164
GenericApplicationContext(AbstractApplicationContext).invokeBeanFactoryPostProcessors(ConfigurableListableBeanFactory) line: 515
So the property gets injected and it doesn't get affected by the CustomEditorConfigurer afterwards (i'm afraid I get a bit lost in Spring core internals).
Am I missing something here? Could you tell me to some resources where I can learn more about Spring Application Context initialization process?

Originally Posted by
Marten Deinum
The simplest solution here would be to create a custom extension to the CustomEditorConfigurer which adds the PriorityOrdered interface, that way it is taken into account.
I've tried this solution (creating a subclass that implements PriorirtyOrdered), and the result is the same... The problem is that the PropertyPlaceHolderConfigurer has its location resource already initialized in the beanFactory.getBean(), and the property doesn't get injected after invokeBeanFactoryPostProcessors