org.springframework.data.mongodb.core

Class SimpleMongoClientDbFactory

    • Constructor Detail

      • SimpleMongoClientDbFactory

        public SimpleMongoClientDbFactory(String connectionString)
        Creates a new SimpleMongoClientDbFactory instance for the given connectionString.
        Parameters:
        connectionString - connection coordinates for a database connection. Must contain a database name and must not be null or empty.
        See Also:
        MongoDB Connection String reference
      • SimpleMongoClientDbFactory

        public SimpleMongoClientDbFactory(com.mongodb.ConnectionString connectionString)
        Creates a new SimpleMongoClientDbFactory instance from the given MongoClient.
        Parameters:
        connectionString - connection coordinates for a database connection. Must contain also a database name and not be null.
      • SimpleMongoClientDbFactory

        public SimpleMongoClientDbFactory(com.mongodb.client.MongoClient mongoClient,
                                          String databaseName)
        Creates a new SimpleMongoClientDbFactory instance from the given MongoClient.
        Parameters:
        mongoClient - must not be null.
        databaseName - must not be null or empty.