在游戏应用程序conf application.conf
中,有一点评论:
# The combination of these two settings results in "db.default" as the
# default JDBC pool:
#config = "db"
#default = "default"
我不知道这是什么意思 - “默认JDBC池”意味着什么,我可以改变单词〜喜欢,可以配置为“鼠标”吗?可以默认=“任何”吗?
如果这些事情发生变化会有什么影响?
答案 0 :(得分:0)
如docs
中所述 config = "db"
从中读取数据库配置的配置项的名称。 因此,如果设置为db,则表示db.default是配置所在的位置 找到名为default的数据库。
default = "default"
默认数据库的名称,在未明确指定数据库名称时使用。
举个例子:
让你的application.conf
成为
db{
config="db"
default="default"
}
它声明所有db
配置(如驱动程序,网址,用户名,密码等)都位于db.default
,其数据库名称为default
。
如果说 D b{ 配置= “customConfig” default =“dbName”//明确声明了db名称 }
现在db的配置不是默认配置,它是一个自定义配置,您可以在其中读取
之类的值db.customConfig.url
db.customConfig.driver
您的dbName也更改为自定义
您可以从文档中了解更多信息。