Can someone tell me how do I configure spring data mongoDB in such a way that it does not create a new collection(if it does not exist) but throws an exception while inserting a document?
Disable create collection in spring data mongoDB
Asked Answered
Not easy way - other answer
says: turn on access control and then create a role with the appropriate restrictions. Read docs using links there.
© 2022 - 2024 — McMap. All rights reserved.