I have two projects, one of which (Services) includes the second (Core). I defined this PropertyPlaceholderConfigurer below in the main project:
<bean id="propertyConfigurer" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"> <property name="locations"> <list> <value>classpath:appConfig.properties</value> </list> </property> </bean>
And I want to extend the core Core placeholder in the top project, including appConfig.properties and some others. The only way I found is to define another different bean (different ID) at the top level and include new ones:
<bean id="servicesPropertyConfigurer" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"> <property name="locations"> <list> <value>classpath:swagger.properties</value> </list> </property> </bean>
But he gives that he cannot find appConfig.properties, I assume that he uses only one of these PropertyPlaceholderConfigurer at the same time? Do I need to specify all resources in the top propertyConfigurer ?:
<bean id="servicesPropertyConfigurer" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"> <property name="locations"> <list> <value>classpath:swagger.properties</value> <value>classpath:appConfig.properties</value> </list> </property> </bean>
Is it possible to use Core bean o in both cases at the same time?
source share