Akka中-Dconfig.resource和-Dconfig.file之间有什么区别? [英] What diference between -Dconfig.resource and -Dconfig.file in akka?

查看:162
本文介绍了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

使用<$ c $加载配置c> -Dconfig.file 是指定要加载的外部文件的方式,

Loading configuration with -Dconfig.file is the way to specify an external file to load,

-Dconfig.resource -用于内部资源。

来自:配置文件的语法和功能

这篇关于Akka中-Dconfig.resource和-Dconfig.file之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆