How do we specify environment-specific (DEV, STAGING, PROD) properties in BloomReach?


I’m new to the BloomReach platform and I’m wondering if some kind individual might be able to provide me with direction on best practices for setting environment-specific properties that can then be accessed by, say, Spring beans.

This is something that can come up if we need to integrate with a third-party service provider to specify some sort of property (eg. “”) whose value might differ between the DEV and STAGING environments, for example.

To illustrate more clearly, in a shared development server (eg. “DEV”), I might need to specify:

And similarly in a STAGING/QA environment, I might need to use the same property name, but with a different value like so:

Is there a standard approach to setting such environment-specific properties in BloomReach?

One approach that came to my mind was to try to add a new String property to the “/hst:hst/hst:hosts/dev-localhost” virtual host group in the CMS Console, and then define other virtual host groups for other environments (QA, UAT, PROD, whatever). However, I quickly discovered that I cannot just add any arbitrary string property to an hst:virtualhostgroup.

Any help in the matter would be very gratefully appreciated!

Thank you,

1 Like

You may want to consider this [1], specially when you are developing HST components.

One of the suggested way is to drop a file in your catalina /conf folder: once loaded, those properties can be used almost everywhere in your site application.

For each environment you can have different values in those properties files.




Hello, Giacomo.

Firstly, thank you so much for your prompt assistance. It did help.

As an alternate approach to accessing properties within Java code, I created the following Spring configuration file in my BloomReach installation:


In that file, I added the following line within the standard “beans” element:

<context:property-placeholder location=“”/>

I placed a file named “” in the classpath, and then added properties such as, “”.

This enabled me to access configurable properties file values in class fields within my Java code in the following manner:

private String clientId;

I’m not sure if the above approach is the most elegant way to do this in BloomReach, but it appears to work just fine. Note that, when I placed an file in the /conf folder without taking steps such as those described above, I was unable to access properties values with Spring annotations such as “@Value”. But that’s fine because this approach appears to work well.

Thanks so much for the direction and inspiration!