Closed michaelmosmann closed 12 months ago
Setting de.flapdoodle.mongodb.embedded.storage.repl-set-name=rs0
in the application.properties
when using de.flapdoodle.embed.mongo.spring
enables replicasets in a way that transactions seem to work. Maybe this does the trick here too?
@XSpielinbox you are right, if you use the spring integration: https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo.spring/blob/041421695626591599798602a39df8a61e3fdb42/src/main/java/de/flapdoodle/embed/mongo/spring/autoconfigure/AbstractServerFactory.java#L84
maybe it is time for an backport:)
@XSpielinbox you are right, if you use the spring integration: https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo.spring/blob/041421695626591599798602a39df8a61e3fdb42/src/main/java/de/flapdoodle/embed/mongo/spring/autoconfigure/AbstractServerFactory.java#L84
maybe it is time for an backport:)
If its already in the spring3.1.x branch of https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo.spring/ , which I use anyhow, it would be nice, if there would be an explationaion in the HowTo.md how to use this autoconfigure/AbstractServerFactory, because it is not clear to me.
Is setting the de.flapdoodle.mongodb.embedded.storage.repl-set-name=rs0
really all you need to do ?
@bodote yes.. the setting is all you need, as everything else will be configured from that (using AbstractServerFactory etc).
de.flapdoodle.mongodb.embedded
I see, thank you. BTW using "de.flapdoodle.mongodb.embedded." and "de.flapdoodle.embed.mongo." for properties is really confusing, and can easily get mixed up which would lead to wrongly setting properties which are not working.
@bodote hmmm.. i may fix this with the next mayor release.. i think it was 'spring.mongodb.embedded' .. and i changed it to 'de.flapdoodle.mongodb.embedded' ..
moved it to an new issue.. so i close this.
Discussed in https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/discussions/496