PropertyPlaceholderConfigurer - placeholders order

Ramesh Pabbati <[email protected]> Wed, 17 Dec 2014 23:53:37 +0000 (UTC)
Newsgroups gmane.comp.java.springframework.user
Message-ID <[email protected]>
Hi,

We use PropertyPlaceholderConfigurer to configure services 


<bean
        class='com.xxxxxxx.util.EnvironmentPropertyPlaceholderConfigurer'>
        <property name='locations'>
            <list>
                <value>classpath:service_config.properties</value>
            </list>
        </property>
        <property name="ignoreUnresolvablePlaceholders" value="false" />
        <!-- ignore possible missing property files -->
        <property name="ignoreResourceNotFound" value="false" />
    </bean>

Where is EnvironmentPropertyPlaceholderConfigurer defined as follows

public class EnvironmentPropertyPlaceholderConfigurer 
 extends PropertyPlaceholderConfigurer implements InitializingBean {

In the 'service_config.properties' file we have long list of config values 
with place holder. I want to know if placeholder can be used before 
assigning a value to it. For example.

line # : 20 database.driverName=${database.driverName}

line # 200: dev.database.driverName=net.sourceforge.jtds.jdbc.Driver

Since our properties files have lots of line, it is very difficult to assign 
values to placeholders before using them.

It seem to work, is this expected behavior?

Thank you
Ramesh


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk