You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@OverridepublicvoiddeleteEmployee(LongemployeeId) {
// we need to check whether employee with given id is exist in DB or notEmployeeexistingEmployee = employeeRepository.findById(employeeId)
.orElseThrow(() -> newIllegalArgumentException(
"Employee not exists with a given id : " + employeeId)
);
employeeRepository.deleteById(employeeId);
}