Created
July 16, 2019 11:45
-
-
Save adamw/798336defa598d49ff6023afaf2edb28 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class DBConfig(username: String, password: String, url: String, | |
migrateOnStart: Boolean, driver: String, connectThreadPoolSize: Int) { | |
override def toString: String = | |
s"DBConfig($username,***,$url,$migrateOnStart,$driver,$connectThreadPoolSize)" | |
} | |
case class HttpConfig(host: String, port: Int) | |
// ... other config classes ... | |
case class Config(db: DBConfig, api: HttpConfig, email: EmailConfig, | |
passwordReset: PasswordResetConfig, user: UserConfig) | |
trait ConfigModule extends StrictLogging { | |
lazy val config: Config = pureconfig.loadConfigOrThrow[Config] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment