Skip to content

Instantly share code, notes, and snippets.

@mkubala
Created October 9, 2013 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkubala/897a5b4e137cdf96056c to your computer and use it in GitHub Desktop.
Save mkubala/897a5b4e137cdf96056c to your computer and use it in GitHub Desktop.
config.getString("my.organization.project.name") // => DeathStar
// Let's override project's name with String "RebrandedProject"
val updatedConfig = config.withValue("my.organization.project.name", ConfigValueFactory.fromAnyRef("RebrandedProject")
updatedConfig.getString("my.organization.project.name") // => RebrandedProject
updatedConfig.getString("my.organization.project.description") // => DeathStar is a tool to take control over whole world. By world I mean couch, computer and fridge ;)
// Because of immutability the original Config stay untouched
config.getString("my.organization.project.name") // => DeathStar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment