0

I am trying to create an application where I can pass the shell commands for mongoDB and then execute it in java.

One of the exmaple I tried is as below

 DBObject dbobject=(DBObject) JSON.parse("{$and:[{sections.data.rowIdx: {$in: [1]}},{year:2015},{issuerId:19038},{sections.data.values.numValue:3548}]}");

This example works with Native java code. NOw I want to use Spring boot and springframework using mongodbtemplate. Is there a way to execute such shell commands directly?

Or should I look for another Springfamework solution?

athenatechie
  • 699
  • 2
  • 8
  • 15
  • did you check this http://stackoverflow.com/questions/32486488/how-to-run-js-file-in-mongo-using-spring-data – pvpkiran May 10 '17 at 15:47
  • I think it doesnt clearly tell. If i need to do execute a query like db.getCollection('InsStatData').find({$and:[{'sections.data.rowIdx': {$in: [1]}}, {year:2015},{issuerId:19038}]}) – athenatechie May 10 '17 at 17:08

0 Answers0