I am using Slick in Play for Scala standalone (ie not web application). Where to put the application.conf file so Slick takes the database configuration?
I tried in main/resources/application.conf but it doesn't work. This is my directories structure:
And this is the error I'm getting:
Exception in thread "main" com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'dbControl'
And appplication.conf:
dbControl = {
url = "jdbc:mysql://localhost:3306/control0001"
driver = com.mysql.jdbc.Driver
connectionPool = disabled
keepAliveConnection = true
user=root
password=xxxx
}
这对我有用,将application.conf直接放在src / main / scala文件夹中。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.