@Configuration @EnableConfigurationProperties(value={MongoProperties.class,EmbeddedMongoProperties.class}) @ConditionalOnClass(value={com.mongodb.Mongo.class,<error>}) public class EmbeddedMongoAutoConfiguration extends Object
Auto-configuration
for Embedded Mongo.Modifier and Type | Class and Description |
---|---|
protected static class |
EmbeddedMongoAutoConfiguration.EmbeddedMongoDependencyConfiguration
Additional configuration to ensure that
MongoClient beans depend on the
embeddedMongoServer bean. |
Constructor and Description |
---|
EmbeddedMongoAutoConfiguration(MongoProperties properties,
EmbeddedMongoProperties embeddedProperties,
ApplicationContext context,
IRuntimeConfig runtimeConfig) |
Modifier and Type | Method and Description |
---|---|
IMongodConfig |
embeddedMongoConfiguration() |
MongodExecutable |
embeddedMongoServer(IMongodConfig mongodConfig) |
public EmbeddedMongoAutoConfiguration(MongoProperties properties, EmbeddedMongoProperties embeddedProperties, ApplicationContext context, IRuntimeConfig runtimeConfig)
@Bean(initMethod="start", destroyMethod="stop") @ConditionalOnMissingBean public MongodExecutable embeddedMongoServer(IMongodConfig mongodConfig) throws IOException
IOException
@Bean @ConditionalOnMissingBean public IMongodConfig embeddedMongoConfiguration() throws IOException
IOException
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.