Implementing/Overriding MongoRepository Keep HATEOAS Formatting
问题 I have a simple MongoRepository I would like to modify to return the generated ObjectId on post(save()). public interface EmployeeRepository extends MongoRepository<Employee, String> { public void delete(Employee employee); public Employee save(Employee employee); public Employee findOne(String id); public List<Employee> findAll(); public Employee findByName(String principal); } I have explored ways to generate the id client side and pass it in the post BUT I really want Spring to handle this