无论如何都要以下列方式合并两个配置文件:
val conf1= ....
val conf2= ....
conf1.withFallbackToPath(conf2,"root.branch2")
**conf1.conf**
root {
branch1 {
value="Hello i am source"
}
}
**conf2.conf**
value = "I am merged"
此合并的结果应为:
root {
branch1 {
value="Hello i am source"
}
branch2 {
value = "I am merged"
}
}
答案 0 :(得分:3)
conf2.atPath(" root.branch2&#34)。withFallback(CONF1)