jZenith Logo

An opinionated approach to building modern Java Microservices

View project on GitHub

MongoDB Plugin


The MongoDB Plugin gives you

  • Vert.x MongoDB

The MongoDB Plugin can be enabled by calling


Typical DAO implements look like

public class UserDaoImpl extends MongoDbDao<User> implements UserDao {

    public UserDaoImpl(MongoClient client) {
        super(client, User.class, user -> user.getId().toString());
    public Single<User> save(@NonNull User user) {
        return super.insert(user)

You should also subclass MongoDbDao for a couple of methods to load and store data.

Configuration properties

defined in MongoDbConfiguration

  • mongo.db.connect.string: The connect string for mongodb
  • mongo.db.database.name: The database to use (defaults to “database”)