public void save(User user) { mongoTemplate.insert(user);}public void saveAll(List<User> userList
public void save(User user) { mongoTemplate.insert(user);}public void saveAll(List<User> userList) { mongoTemplate.insertAll(userList);}public void delete(Long id) { Query query = new Query(Criteria.where("id").is(id)); mongoTemplate.remove(query, User.class);}public User findById(Long id) { Query query = new Query(Criteria.where("id").is(id)); return mongoTemplate.findOne(query, User.class);}public User findByName(String name) { Query query = new Query(Criteria.where("name").is(name)); return mongoTemplate.findOne(query, User.class);}