Browse Source

Polish "Upgrade to Embedded Mongo 3.2.5"

See gh-28543
pull/29200/head
Stephane Nicoll 4 years ago
parent
commit
f26bee1196
  1. 14
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfiguration.java
  2. 2
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfigurationTests.java
  3. 2
      spring-boot-project/spring-boot-dependencies/build.gradle

14
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfiguration.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -37,7 +37,7 @@ import de.flapdoodle.embed.mongo.distribution.IFeatureAwareVersion; @@ -37,7 +37,7 @@ import de.flapdoodle.embed.mongo.distribution.IFeatureAwareVersion;
import de.flapdoodle.embed.mongo.distribution.Version;
import de.flapdoodle.embed.mongo.distribution.Versions;
import de.flapdoodle.embed.process.config.RuntimeConfig;
import de.flapdoodle.embed.process.config.io.ProcessOutput;
import de.flapdoodle.embed.process.config.process.ProcessOutput;
import de.flapdoodle.embed.process.config.store.DownloadConfig;
import de.flapdoodle.embed.process.config.store.ImmutableDownloadConfig;
import de.flapdoodle.embed.process.distribution.Version.GenericVersion;
@ -138,8 +138,8 @@ public class EmbeddedMongoAutoConfiguration { @@ -138,8 +138,8 @@ public class EmbeddedMongoAutoConfiguration {
builder.net(new Net(getHost().getHostAddress(), configuredPort, Network.localhostIsIPv6()));
}
else {
builder.net(new Net(getHost().getHostAddress(), Network.getFreeServerPort(getHost()),
Network.localhostIsIPv6()));
builder.net(
new Net(getHost().getHostAddress(), Network.freeServerPort(getHost()), Network.localhostIsIPv6()));
}
return builder.build();
}
@ -204,11 +204,9 @@ public class EmbeddedMongoAutoConfiguration { @@ -204,11 +204,9 @@ public class EmbeddedMongoAutoConfiguration {
RuntimeConfig embeddedMongoRuntimeConfig(
ObjectProvider<DownloadConfigBuilderCustomizer> downloadConfigBuilderCustomizers) {
Logger logger = LoggerFactory.getLogger(getClass().getPackage().getName() + ".EmbeddedMongo");
ProcessOutput processOutput = ProcessOutput.builder()
.output(Processors.logTo(logger, Slf4jLevel.INFO))
ProcessOutput processOutput = ProcessOutput.builder().output(Processors.logTo(logger, Slf4jLevel.INFO))
.error(Processors.logTo(logger, Slf4jLevel.ERROR))
.commands(Processors.named("[console>]", Processors.logTo(logger, Slf4jLevel.DEBUG)))
.build();
.commands(Processors.named("[console>]", Processors.logTo(logger, Slf4jLevel.DEBUG))).build();
return Defaults.runtimeConfigFor(Command.MongoD, logger).processOutput(processOutput)
.artifactStore(getArtifactStore(logger, downloadConfigBuilderCustomizers.orderedStream()))
.isDaemonProcess(false).build();

2
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfigurationTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

2
spring-boot-project/spring-boot-dependencies/build.gradle

@ -307,7 +307,7 @@ bom { @@ -307,7 +307,7 @@ bom {
]
}
}
library("Embedded Mongo", "3.2.0") {
library("Embedded Mongo", "3.2.5") {
group("de.flapdoodle.embed") {
modules = [
"de.flapdoodle.embed.mongo"

Loading…
Cancel
Save