1

My requirement is that I have to write a service in Spring to fetch all attributes of a collection in Mongo. The solutions that I've found explain how to get attributes using mongo shell.

Using map/reduce for mapping the properties in a collection

Now I want to do the same thing in programmatic way in Java, How should I do it?

  • The representation of JavaScript functions with the Java driver is really just "strings". You really should not do or even "need" this sort of thing in a production environment anyway. So I would strongly suggest you don't. – Neil Lunn Nov 13 '18 at 07:29

0 Answers0