spring dynamic properties

Nice post: http://amitsavm.blogspot.com/2012/03/dynamic-placeholder-substitution-in.html#comment-form

Basically, to use java.text.MessageFormat to replace the placeholder runtime

GET_TABLE_COUNT = select count(1) from {0}

    public static String getProperty(final String key, final String[] arguments){
        return MessageFormat.format(prop.get(key), arguments);


Author: lwpro2

Java J2EE professional

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s