Java RestController REST parameter dependency injection or request
问题 I am trying inject a dependency or at least filtrate the ID parameter that come into a RestControler in Spring. I am very new in Spring. How can i be sure that the parameter that comes passed in the API is valid and/or how can i inject its dependency related to Customer Entity? This is my rest controller CustomerController method @PatchMapping("/{id}") public Customer updateCustomer(@PathVariable Long id, @RequestBody Customer customer) { return customerService.updateCustomer(id, customer); }