Şöyle yaparız
import org.springframework.data.mongodb.core.MongoTemplate;import org.springframework.data.mongodb.core.query.Criteria;import org.springframework.data.mongodb.core.query.Query;// ...String[] tags = {"fiction", "novel"};Query query = new Query();query.addCriteria(Criteria.where("tags").all(tags));List<Book> books = mongoTemplate.find(query, Book.class);
Hiç yorum yok:
Yorum Gönder