本文介绍了Akka中-Dconfig.resource和-Dconfig.file之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
根据Akka配置文档:
-Dconfig.resource 和 -Dconfig.file有什么区别参数?
推荐答案系统属性可用于强制使用其他配置源:
System properties can be used to force a different config source:
- config.resource 指定资源名称-不是基本名称,即application.conf不是application
- config.file 指定文件系统路径,再次应包含扩展名,而不是基本名称
- config.url 指定URL
- config.resource specifies a resource name - not a basename, i.e. application.conf not application
- config.file specifies a filesystem path, again it should include the extension, not be a basename
- config.url specifies a URL
使用 -Dconfig.file 是指定要加载的外部文件的方式,
Loading configuration with -Dconfig.file is the way to specify an external file to load,
-Dconfig.resource -用于内部资源。
来自:配置文件的语法和功能。
更多推荐
Akka中
发布评论