SyntaxHighlighter

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 http://stackoverflow.com/questions/16062922/using-jndi-datasource-with-spring-batch-admin/16080997

No comments:

Post a Comment