- ConfigFactory.load
- https://github.com/lightbend/config/blob/d5ba11fbb5cea694c1b9fb7321b947ddec11d9ce/config/src/main/java/com/typesafe/config/ConfigFactory.java#L246-L262
- ConfigParseOptions.defaultsはallowMissing true
- defaultApplition
- defaultApplication
- getConfigLoadingStrategy
- 特に何も指定しない場合 DefaultConfigLoadingStrategy
- DefaultConfigLoadingStrategy#parseApplicationConfig
- config.resource読んでる
- -Dconfigが指定されてない場合はparseResourceAnySnntax
- ConfigImpl
- fromBasename
- application.(conf|json|file) からclass読み込みしようとする。全部見つからず、
allowMissing
がtrueなら https://github.com/lightbend/config/blob/f6680a5dad51d992139d45a84fad734f1778bf50/config/src/main/java/com/typesafe/config/impl/SimpleIncluder.java#L172
- application.(conf|json|file) からclass読み込みしようとする。全部見つからず、
- config.resourceが指定されている場合はparseResources
- parseResources
- Parseable.newResources
- まわりまわってここが呼ばれる
- こっちではresourceが見つからなかったらjava.io.exceptionがthrowされる
- DefaultConfigLoadingStrategy#parseApplicationConfig
- defaultApplication
- defaultApplition
Created
November 26, 2018 09:05
-
-
Save tanishiking/f72ddceedcdfcb4c811f360da68cf090 to your computer and use it in GitHub Desktop.
Type safe config のコード呼んだときのメモ
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment