I have few stored Javascripts in mongodb. I am using spring springframework.data.mongodb to access mongodb. How can i execute stored JavaScripts/procedures from this ?
found the solution.
BasicDBObject obj = new BasicDBObject();
obj.append( "$eval" , "stored_javascript_name()" );
CommandResult t=mongoTemplate.executeCommand(obj);
Object obj1=t.get("retval");