TypeSafe config override

Every now and then you need to be able to define some default value in your configuration and be able to override them based on the environment you are running in. TypeSafe Config has a nice way of allowing this:

production {
  service1: 172.0.0.1
  service2: ${?SERV1}
}

when you define you config like this if your application start with -DSERV1=10.0.0.1 then the command line value will override the default in the configuration file.


Metadata

81 words

First published on 2017-03-28

Generated on 13 Dec 2024 at 12:11 AM

Index

Mobile optimized version. Desktop version.