How to make embedded mongodb keep the data on application shutdown?
问题 I don't want to install the full mongodb, so I created a simple spring-boot application with the following pom: <!-- This dependency is to have an embedded mongodb --> <dependency> <groupId>de.flapdoodle.embed</groupId> <artifactId>de.flapdoodle.embed.mongo</artifactId> <version>1.50.5</version> </dependency> <!-- while this provides a spring factory bean for the embedded mongodb --> <dependency> <groupId>cz.jirutka.spring</groupId> <artifactId>embedmongo-spring</artifactId> <version>RELEASE<