This seems like a pretty common problem, but I haven\'t found any sort of consensus on the best method, so I\'m posing the question here.
I\'m working on a command-l
Spring Property Placeholder Configurer – A few not so obvious options
${db.username.${mode}}
: Here "mode" defines the project mode (environment) - dev / prod
Properties file looks like:
#Database properties
#mode dev/prod
mode=dev
#dev db properties
db.url.dev=jdbc:mysql://localhost:3306/dbname
db.username.dev=root
db.password.dev=root
#prod db properties
db.url.prod=jdbc:mysql://localhost:3306/dbname
db.username.prod=root
db.password.prod=root