Handling ambiguous handler methods mapped in REST application with Spring
I tried to use some code as below: @RequestMapping(value = "/{id}", method = RequestMethod.GET) public Brand getBrand(@PathVariable Integer id) { return brandService.getOne(id); } @RequestMapping(value = "/{name}", method = RequestMethod.GET) public List<Brand> getBrand(@PathVariable String name) { return brandService.getSome(name); } But I got error like this, how can I do? java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path 'http://localhost:8080/api/brand/1': {public java.util.List com.zangland.controller.BrandController.getBrand(java.lang.String), public com