-->

Play-Framework 2.4.x used with MongoDB and Java 8

2019-04-13 08:55发布

问题:

I am creating a project using Play-Framework 2.4.x , MongoDB and Java 8. But with Play-Framework there are no good mongo plugins for Java. Play-Framework mentions some plugin in there module section like Jongo, Mongo-Morphia but all are older and there updated are closed.

I have an option to use Spring-Data-Mongo with Play-Framework, but my first priority is for plugin that have support and updates for Play-Framework and Java. Please recommend me, if there is are good plugins?

回答1:

To use MongoDB with Play framework for Java, it would be better to use Native Jongo library or Morphia library. You can create abstraction layer for it and use it. Morphia library has been maintained by MongoDB community for Java API and both libraries are still active for Native library. Also i spent lots of time to choose correct plugin for Play, yet there was no luck.