0
我在Play for Scala獨立版(即不是Web應用程序)中使用Slick。在哪裏放置application.conf文件,讓Slick進行數據庫配置?Play for Scala standalone中放置application.conf的位置?
我試過在main/resources/application.conf中,但它不起作用。這是我的目錄結構:
這是我得到的錯誤:
在線程異常 「主要」 com.typesafe.config.ConfigException $缺失:沒有配置設置 發現鑰匙 'dbControl'
而且appplication.conf:
dbControl = {
url = "jdbc:mysql://localhost:3306/control0001"
driver = com.mysql.jdbc.Driver
connectionPool = disabled
keepAliveConnection = true
user=root
password=xxxx
}
嘗試放置另一個虛擬配置,並嘗試訪問它。只是爲了檢查它是否無法讀取配置文件,或者它只是它被錯誤定義的關鍵 – pedrorijo91