lightbend/config 没有看到值

lightbend/config does not see the value

我试图在我的 Java Maven 项目中实施 lightbend/config。在根目录中,我有 application.conf 文件,它看起来像:

"adminPassword": "xxxxxxxxxxxx"

"whatever": {
  "sub-whatever": "aaaaaaaaaaaa"
}

我这样称呼它:

Config conf = ConfigFactory.load();
System.out.println( conf.getString("adminPassword") );
System.out.println( conf.getString("whatever.sub-whatever") );

此代码向我抛出一个错误:

ConfigException$Missing: system properties: No configuration setting found for key 'adminPassword'

有人可以告诉我这段代码或设置有什么问题吗?

好像路径不对。它必须在包目录和资源目录中。

C:\SeleniumTests\projectName\src\test\resources\application.conf