我正在尝试在 play framework 2.1 中的 application.conf 文件中添加新键。我添加了以下键:
gen.db.host=localhost
gen.db.port=27017
gen.db.name=test
当我启动我的应用程序时,它会引发以下错误:
Configuration error: Configuration error[application.conf: 46: port has type NUMBER rather than OBJECT]
......
......
......
Caused by: com.typesafe.config.ConfigException$WrongType: application.conf: 46: port has type NUMBER rather than OBJECT
我不明白这个问题。我该如何解决?另外,在 application.conf 文件中定义新键是一个好习惯吗?
谢谢。