java - In Spring boot, When the new document is created when using @Document annotation? -
i new spring , mongodb. so, hear use case want understand.
in springboot , mongodb structure. trying insert new document in mongo, hence used @document in java pojo/domain/data class. now, have written code , starting server. question is, when collection created in mongodb? i.e. while starting server (spring scan classes @document , create collection id db while creating classes) or when repository code invoked (when trying perform crud operations)?
the collection in mongodb along indexes created when repository code invoked perform crud operations ..
Comments
Post a Comment