gpt4 book ai didi

scala - 关于驱动程序和配置文件的 playframework slick 弃用警告

转载 作者:行者123 更新时间:2023-12-02 18:05:26 25 4
gpt4 key购买 nike

我收到这条消息:

[warn] s.b.DatabaseConfig - Use `profile` instead of `driver`. The latter is deprecated since Slick 3.2 and will be removed.

我的配置如下:

slick.dbs.default.driver = "slick.driver.MySQLDriver$"
slick.dbs.default.db.driver = "com.mysql.jdbc.Driver"
slick.dbs.default.db.url = "jdbc:mysql://"
slick.dbs.default.db.user = ""
slick.dbs.default.db.password = ""

我该如何更改此设置才能删除警告?

谢谢

最佳答案

尝试以下操作:

slick.dbs.default.profile = "slick.jdbc.MySQLProfile$"
slick.dbs.default.db.driver = "com.mysql.jdbc.Driver"
slick.dbs.default.db.url = "jdbc:mysql://"
slick.dbs.default.db.user = ""
slick.dbs.default.db.password = ""

HOCON 格式中的内容相同:

slick {
dbs {
default {
profile = "slick.jdbc.MySQLProfile$"
db {
driver = "com.mysql.jdbc.Driver"
url = "jdbc:mysql://"
user = ""
password = ""
}
}
}
}

关于scala - 关于驱动程序和配置文件的 playframework slick 弃用警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45922318/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com