2014-09-02 64 views

回答

0

感謝斯特凡Godbillon他在ReactiveMongo谷歌組答案:

你可以叫你濾鏡的對象ReactiveMongoPlugin(在包play.modules.reactivemongo)上connection

val connection = ReactiveMongoPlugin.connection(play.api.Play.current) 
    val db = connection("your-db") 

    def collection: JSONCollection = db.collection[JSONCollection]("your-collection")