【发布时间】:2019-10-06 21:07:17
【问题描述】:
我正在尝试使用 ballerina V 1.0 从文件中获取配置值。 配置文件如下:
我正在尝试将 test.bal 文件中的值打印为;
io:println(config:getAsString("student.jdbc.username"));
当我在 ballerina.conf 文件中提供配置值时,它在以下命令中运行良好。
芭蕾舞演员运行.\test.bal
现在我需要从另一个文件 (testConf.conf) 中读取配置 我尝试了下面的命令来运行我的项目,但它没有像预期的那样采用配置值。
芭蕾舞演员运行.\test.bal -config testConf.conf
芭蕾舞演员运行.\test.bal -c testConf.conf
芭蕾舞演员运行 .\test.bal -Bballerina.conf=.\testConf.conf
还尝试使用上述命令使用 .toml 文件,但没有成功。
从给定文件(ballerina.conf 除外)读取配置的命令是什么?
【问题讨论】:
标签: ballerina