如何在 HCONF 配置文件中添加 $ 符号?
How to put $ symbol in HCONF config file?
我正在使用 alpakka 来配置数据库。我想在运行时配置 slick config,例如:
对于slick.jdbc.PostgresProfile$部分,如何在配置中放入“$”?
s"""
|config {
| profile = "slick.jdbc.PostgresProfile$"
| db {
| dataSourceClass = "slick.jdbc.DriverDataSource"
| properties = {
| driver = "org.postgresql.Driver"
| url = "${dbUrl}"
| user = "${dbUser}"
| password = "${dbPassword}"
| }
| }
|}
|
""".stripMargin
尝试
profile = "slick.jdbc.PostgresProfile$$"
我正在使用 alpakka 来配置数据库。我想在运行时配置 slick config,例如:
对于slick.jdbc.PostgresProfile$部分,如何在配置中放入“$”?
s"""
|config {
| profile = "slick.jdbc.PostgresProfile$"
| db {
| dataSourceClass = "slick.jdbc.DriverDataSource"
| properties = {
| driver = "org.postgresql.Driver"
| url = "${dbUrl}"
| user = "${dbUser}"
| password = "${dbPassword}"
| }
| }
|}
|
""".stripMargin
尝试
profile = "slick.jdbc.PostgresProfile$$"