Home > database >  The correct GridFsTemplate find methods
The correct GridFsTemplate find methods

Time:09-25

I will be directing integrated into the spring, when using GridFsTemplate met
Java. Lang. NoSuchMethodError: com. Mongo. Gridfs. Gridfs. Find (Lcom/mongo/DBObject; Lcom/mongo/DBObject;) Ljava/util/List; This error
My code is as follows

Query query=new Query();
Query. AddCriteria (Criteria. The where (" filename "), is (" helloworld "));
This. GridTemplate. Find (query);
Please teach warrior,

CodePudding user response:

GridFsTemplate. The find () returns a list of your function is the return of the list

CodePudding user response:

Use the findOne
  • Related