Neat Doc
Here's how you can organize the content into a Notion document format:
MongoOperations template = new MongoTemplate(
new SimpleMongoClientDbFactory(MongoClients.create(), "database")
);
Insert Document
template.insert(p);
Find Document by ID
template.findById(p.getId(), Person.class);
Update First Document
template.updateFirst(query(where("name").is("Joe")), update("age", 35), Person.class);
Find One Document
p = template.findOne(query(where("name").is("Joe")), Person.class);
Remove Document
template.remove(p);
Find All Documents
List<Person> people = template.findAll(Person.class);
Drop Collection
template.dropCollection(Person.class);