Per Spring @Configuration documentation, your RootConfig
class has to be "bootstrapped" from somewhere, below are some examples.
via AnnotationConfigApplicationContext
AnnotationConfigApplicationContext context =
new AnnotationConfigApplicationContext();
ccontext.register(RootConfig.class);
via Spring xml
<beans>
<context:annotation-config/>
<bean class="...RootConfig"/>
</beans>
Have you checked the source that's bootstrapping RootConfig
to see if a PropertySourcesPlaceholderConfigurer
has been declared? For example:
<context:property-placeholder/>