org.springframework.data.mongodb.core

Class SimpleMongoDbFactory

    • Constructor Detail

      • SimpleMongoDbFactory

        public SimpleMongoDbFactory(com.mongodb.MongoClientURI uri)
        Creates a new SimpleMongoDbFactory instance from the given MongoClientURI.
        Parameters:
        uri - coordinates for a database connection. Must contain a database name and must not be null.
        Since:
        1.7
      • SimpleMongoDbFactory

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