Replace usage of deprecated API in EmbeddedMongoAutoConfiguration

pull/3967/head
Andy Wilkinson 9 years ago
parent 4805642931
commit b79ca614a1

@ -47,8 +47,8 @@ import com.mongodb.MongoClient;
import de.flapdoodle.embed.mongo.Command; import de.flapdoodle.embed.mongo.Command;
import de.flapdoodle.embed.mongo.MongodExecutable; import de.flapdoodle.embed.mongo.MongodExecutable;
import de.flapdoodle.embed.mongo.MongodStarter; import de.flapdoodle.embed.mongo.MongodStarter;
import de.flapdoodle.embed.mongo.config.ArtifactStoreBuilder;
import de.flapdoodle.embed.mongo.config.DownloadConfigBuilder; import de.flapdoodle.embed.mongo.config.DownloadConfigBuilder;
import de.flapdoodle.embed.mongo.config.ExtractedArtifactStoreBuilder;
import de.flapdoodle.embed.mongo.config.IMongodConfig; import de.flapdoodle.embed.mongo.config.IMongodConfig;
import de.flapdoodle.embed.mongo.config.MongodConfigBuilder; import de.flapdoodle.embed.mongo.config.MongodConfigBuilder;
import de.flapdoodle.embed.mongo.config.Net; import de.flapdoodle.embed.mongo.config.Net;
@ -123,10 +123,12 @@ public class EmbeddedMongoAutoConfiguration {
.defaultsWithLogger(Command.MongoD, logger) .defaultsWithLogger(Command.MongoD, logger)
.processOutput(processOutput) .processOutput(processOutput)
.artifactStore( .artifactStore(
new ArtifactStoreBuilder().defaults(Command.MongoD).download( new ExtractedArtifactStoreBuilder().defaults(Command.MongoD)
new DownloadConfigBuilder().defaultsForCommand( .download(
Command.MongoD).progressListener( new DownloadConfigBuilder().defaultsForCommand(
new Slf4jProgressListener(logger)))).build(); Command.MongoD).progressListener(
new Slf4jProgressListener(logger))))
.build();
} }
@Bean @Bean
@ -205,7 +207,8 @@ public class EmbeddedMongoAutoConfiguration {
private ToStringFriendlyFeatureAwareVersion(String version, Set<Feature> features) { private ToStringFriendlyFeatureAwareVersion(String version, Set<Feature> features) {
Assert.notNull(version, "version must not be null"); Assert.notNull(version, "version must not be null");
this.version = version; this.version = version;
this.features = features == null ? Collections.<Feature>emptySet() : features; this.features = features == null ? Collections.<Feature> emptySet()
: features;
} }
@Override @Override

Loading…
Cancel
Save