I'm new to Spring and MongoDB. I'm trying to audit the CRUD operations on MongoDB. I've found many plugins that audit the changes on MongoDB level, but I'm looking for something like an interceptor or hook (for example, EmptyInterceptor for hibernate) which works on Java level.
I'm using GMongo on Java to operate on MongoDB. What is something which can help me in this matter?
I think you can try CommandListener. You just need new a object that implement the interface and add it to MongoClientOptions, then use the MongoClientOptions create a MongoClient. like that: