2014-04-24 2 views
0

Y at-il de toute façon de fusionner deux fichiers de configuration de la façon suivante:Config bibliothèque fusion

val conf1= .... 
val conf2= .... 
conf1.withFallbackToPath(conf2,"root.branch2") 

**conf1.conf** 
root { 
    branch1 { 
     value="Hello i am source" 
    } 
} 

**conf2.conf** 
value = "I am merged" 

Le résultat de cette fusion devrait être:

root { 
    branch1 { 
     value="Hello i am source" 
    } 
    branch2 { 
     value = "I am merged" 
    } 
} 

Répondre

2

conf2.atPath ("root.branch2") .withFallback (conf1)

Questions connexes