public class EmbeddedMongoFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<com.mongodb.Mongo>, org.springframework.beans.factory.DisposableBean
MongoClient.
This class is a wrapper for EmbeddedMongoBuilder from this package.| Constructor and Description |
|---|
EmbeddedMongoFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
com.mongodb.MongoClient |
getObject() |
Class<com.mongodb.MongoClient> |
getObjectType() |
boolean |
isSingleton() |
void |
setBindIp(String bindIp)
An IPv4 or IPv6 address for the MongoDB instance to be bound to during
its execution.
|
void |
setPort(int port)
The port MongoDB should run on.
|
void |
setVersion(String version)
The version of MongoDB to run e.g.
|
public com.mongodb.MongoClient getObject()
throws IOException
getObject in interface org.springframework.beans.factory.FactoryBean<com.mongodb.Mongo>IOExceptionpublic Class<com.mongodb.MongoClient> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<com.mongodb.Mongo>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<com.mongodb.Mongo>public void destroy()
destroy in interface org.springframework.beans.factory.DisposableBeanpublic void setVersion(String version)
PRODUCTION
is used by default. The value must not be empty.public void setPort(int port)
public void setBindIp(String bindIp)
Copyright © 2013–2014. All rights reserved.