2016-07-05 67 views
0

我有一個PlayFramework應用程序,我有多個自定義模塊,我想通過application.conf加載。我不確定指定這個的確切語法是什麼。我想:在PlayFramework中指定多個自定義模塊的格式

enabled += [com.somemodule, com.othermodule] 

enabled += ["com.somemodule","com.othermodule"] 

但既不工程。什麼是指定模塊列表的格式?

+0

爲什麼不這樣做在build.sbt(HTTPS:/ /www.playframework.com/documentation/2.5.x/SBTSubProjects)? – Kris

回答

0

只需添加每個模塊一行:

play.modules.enabled += "com.acme.SomeModule" 
play.modules.enabled += "com.acme.OtherModule" 

HOCON有語法append an array to another,但我不會推薦:

play.modules.enabled = ${?play.modules.enabled} [ "com.acme.SomeModule", "com.acme.OtherModule" ] 
+0

基本上這兩個選項都是一樣的。這是一個品味問題。 – Leo