Hi Steve,

there is a nice article that shows how to use the PropertyPlaceHolderConfigurer.

http://icoloma.blogspot.com/2008/01/mock-your-spring-config-for-fun-and.html

There is no list of passwords and locations. You simply have different property files for your different environments. For example:

Develop:
File config.properties
url=http://dev.server.com/service
username=client1
password=mydevpasswd

Test:
File config.properties
url=http://test.anotherserver/service
username=client1
password=mytestpassword

Ideally you manage to keep these files separate from your module (war in your case). So you can deploy a new version by copying the war and the config stays the same.
I guess you had a quite similar solution with your property files already?!

Greetings

Christian

Steve Cohen schrieb:
Thanks, Christian.

This certainly sounds like it could be the answer to my dilemma and I agree wholeheartedly with you that this is a normal scenario that needs to be supported. However, I don't fully understand what you are suggesting here. Something must be a selector (a key) into the list of locations and passwords and somehow this key needs to be passed to the object doing the resolution. Is there a fleshed out sample of this anywhere?

Steve


Reply via email to