Loading initial data at application startup with Spring Data MongoDB
-
22-12-2019 - |
Question
I use embedded MongoDB database in a development environment. It is setup empty at the application startup. I would like to load initial data which is needed for the application when the Spring context is setup.
Is there a way in Spring Data MongoDB to point a JSON file(s) which would be loaded into a database (something like import.sql (hibernate.hbm2ddl.import_files) in Hibernate or @UsingDataSet in NoSql Unit)?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow