Handling ambiguous handler methods mapped in REST application with Spring
Spring can’t distinguish if the request GET http://localhost:8080/api/brand/1 will be handled by getBrand(Integer) or by getBrand(String) because your mapping is ambiguous. Try using a query parameter for the getBrand(String) method. It seems more appropriate, since you are performing a query: @RequestMapping(value = “/{id}”, method = RequestMethod.GET) public Brand getBrand(@PathVariable Integer id) { return brandService.getOne(id); } … Read more