rkuhn comments applied: no more extension
This commit is contained in:
parent
94b145fc95
commit
abb8366eb4
1 changed files with 2 additions and 4 deletions
|
|
@ -44,10 +44,8 @@ class OsgiActorSystemFactory(val context: BundleContext, val fallbackClassLoader
|
|||
def actorSystemConfig(context: BundleContext): Config = {
|
||||
val bundleSymbolicName = context.getBundle.getSymbolicName
|
||||
val bundleId = context.getBundle.getBundleId
|
||||
val acceptedFileExtension = List("conf", "properties", "json")
|
||||
val acceptedFileName = List(s"bundle-$bundleSymbolicName", s"bundle-$bundleId", "akka")
|
||||
val configurationFiles = acceptedFileName.flatMap(x => acceptedFileExtension.map(y => s"etc/$x.$y"))
|
||||
val applicationConfiguration = configurationFiles.foldLeft(ConfigFactory.empty())((x, y) => x.withFallback(ConfigFactory.parseFileAnySyntax(new File(y))))
|
||||
val acceptedFilePath = List(s"bundle-$bundleSymbolicName", s"bundle-$bundleId", "akka").map(x => s"etc/$x")
|
||||
val applicationConfiguration = acceptedFilePath.foldLeft(ConfigFactory.empty())((x, y) => x.withFallback(ConfigFactory.parseFileAnySyntax(new File(y))))
|
||||
applicationConfiguration.withFallback(ConfigFactory.load(classloader).withFallback(ConfigFactory.defaultReference(OsgiActorSystemFactory.akkaActorClassLoader)))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue