Reputation: 143
public void registerCustomer(Customer cust)
{
customerRepo.save(cust);
}
how can i know that my data is insereted successfully in my above code?
Upvotes: 2
Views: 6603
Reputation: 2721
Here is from CrudReporsitory.save() javadoc:
Saves a given entity. Use the returned instance for further operations as the save operation might have changed the entity instance completely.
It seems like save method returns the saved entity instance.
Upvotes: 3