I have some customers in ArrayList and when I want through Postman delete (with id) it is not working : 500 - Internal Error. Please Could someone help me ?
Delete customer
DELETE http://localhost:8080/api/customers/{customerId}
@DeleteMapping("/api/customers{customerId}") public void deleteCustomer(@PathVariable Long customerId) { customers.remove(this.customers.get(Math.toIntExact(customerId))); }