@Test public void testInsert() { UserDO user = new UserDO(); user.setId(1); user.setUsername("yudaoyuanma"); user.setPassword("buzhidao"); user.setCreateTime(new Date()); UserDO.Profile profile = new UserDO.Profile(); profile.setNickname("芋道源码"); profile.setGender(1); user.setProfile(profile); userDao.insert(user); }
public void insert(UserDO entity) { mongoTemplate.insert(entity); }
UserDao { public void insert(UserDO entity) { mongoTemplate.insert(entity); } }
UserDao { public void insert(UserDO entity) { mongoTemplate.insert(entity); }  }
UserDao { public void insert(UserDO entity) { mongoTemplate.insert(entity); }  void insert(UserDO entity); void updateById(UserDO entity); void deleteById(Integer id); UserDO findById(Integer id); UserDO findByUsername(String username); List<UserDO> findAllById(List<Integer> ids); }
UserDao { public void insert(UserDO entity) { mongoTemplate.insert(entity); }  void insert(UserDO entity); void updateById(UserDO entity); void deleteById(Integer id); UserDO findById(Integer id); UserDO findByUsername(String username); List<UserDO> findAllById(List<Integer> ids);  }