2
public void registerCustomer(Customer cust)
{
customerRepo.save(cust);
}

how can i know that my data is insereted successfully in my above code?

Neil Stockton
  • 11,383
  • 3
  • 34
  • 29
harish
  • 143
  • 3
  • 10

1 Answers1

3

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.

Lyncean Patel
  • 2,433
  • 16
  • 15