Closed
Description
Currently the Embedded Mongo Autoconfigurer uses the outdated de.flapdoodle.embed.mongo:3.0.0
, which is from October 2020. (https://search.maven.org/artifact/de.flapdoodle.embed/de.flapdoodle.embed.mongo)
There seem to be breaking changes, so the Autoconfiguration has to be updated for the latest de.flapdoodle.embed.mongo 3.2.0
. Simply overwriting the the version wont work:
Caused by: java.lang.InstantiationError: de.flapdoodle.embed.process.config.io.ProcessOutput
at org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration$RuntimeConfigConfiguration.embeddedMongoRuntimeConfig(EmbeddedMongoAutoConfiguration.java:203)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
Motivation
Since MongoDb changed the download urls and the package format, the new version of flapdoodle is required to support anything > than mongodb 4.0...
Fix looks simple, replace ...
ProcessOutput processOutput = new ProcessOutput(
Processors.logTo(logger, Slf4jLevel.INFO),
Processors.logTo(logger, Slf4jLevel.ERROR),
Processors.named("[console>]", Processors.logTo(logger, Slf4jLevel.DEBUG))
);
... with ...
ProcessOutput processOutput = ProcessOutput.named("[console>]", logger);