pekko/akka-docs/general/code/ConfigDocSpec.scala
Patrik Nordwall b56201ab7f Updated to latest config lib and changed how reference config files are loaded.
* Config lib 4f3a91f
* All reference files named reference.conf, all will be loaded
* Usage of ConfigFactor.load as default way
* Extensions use same config as ActorSystem.settings.config
2011-11-29 11:56:41 +01:00

31 lines
647 B
Scala

package akka.docs.config
import org.scalatest.WordSpec
import org.scalatest.matchers.MustMatchers
//#imports
import akka.actor.ActorSystem
import com.typesafe.config.ConfigFactory
//#imports
class ConfigDocSpec extends WordSpec {
"programmatically configure ActorSystem" in {
//#custom-config
val customConf = ConfigFactory.parseString("""
akka.actor.deployment {
/app/my-service {
router = round-robin
nr-of-instances = 3
}
}
""")
val system = ActorSystem("MySystem", ConfigFactory.systemProperties.withFallback(customConf))
//#custom-config
system.stop()
}
}