I have two Web applications: app-web1 and app-web2. app-web2 is a module of app-web1. Some configurations are needed by app-web2 that are in app-web1, like a application.properties.
I am using spring PropertySourcesPlaceholderConfigurer to load the properties, but this just work in the context of app-web1. The app-web2's application-context.xml has an import resource from other project common to both Web projects.
Below is my bean in application-context-root.xml that is imported by others application-context:
<bean id="properties" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
<property name="location" value="classpath*:config/application.properties"/>
<property name="placeholderPrefix" value="$spring{" />
<property name="ignoreUnresolvablePlaceholders" value="true"/>
</bean>
My application.properties file is in web-app1 and I want to load this properties in app-web2 context.
How I can do this?
I am using:
- JBoss AS 7.1.1;
- Java EE 7;
- Spring 3.2.12;
Thanks in advance!