Thursday, April 18, 2013

A quick note about Spring Profiles

A quick note about Spring Profiles

Spring Profiles are cool little tools to enable you to keep your configuration together and yet cater for different environments.  (such as testing datasources versus production datasources).  The neat thing to note is that the "" tag(s) are always at the bottom of the XML, forcing bean definitions inside them to overwrite any that came before.



in the example above, it allows you to define two beans with the same name, and have the "local" configuration automatically overwrite the production.

here's the stackoverflow question where i try and put this together

No comments:

Post a Comment