Sorry, don't see the problem, you need to describe that better. From what I understood this is the way to go:
- place
a.propertiesinsrc/main/resourcesin the JAR module - use a
PropertyPlaceholderConfigurerto make the properties available in the Spring context - it'll be packed in root of the JAR
- the JAR ends up in
WEB-INF/libof the WAR which again is "root of the classpath" so to speak
Update, 2013-06-09
(question was updated based on comments to initial answer above)
Essentially what you seem to be looking for (still not quite sure) is how to load properties from a properties file that is not packaged with your WAR/JAR.
In this case you can skip all of the above steps except 2.
- Use a
PropertyPlaceholderConfigurerand specify the location of the file asclasspath*:a.properties(see below) - Place
a.propertiesanywhere on the classpath outside the WAR file.
Warning! Of course you can now edit the properties independently from releasing the WAR file but since Spring initializes the beans on application start and since all beans are singletons by default changes to the properties file won't become effective until you restart the app.
XML example
<bean class="....PropertyPlaceholderConfigurer">
<property name="location" value="classpath*:a.properties" />