개발

mongoDB find결과물 findIterable<Document> 를 JSON으로 바로 변환

wannabenomad 2018. 1. 22. 15:17

findIterable.into() 메서드를 사용

ArrayList<Document> find = collection.find(eq).into(new ArrayList<Document>());

그러면 데이터셋이 find에 바로 들어감!

collection이면 아무거나 다됌!