This is my controller:
@Controller
@RequestMapping("/area")
public class AreaController {
@RequestMapping("/{id}")
public String getPage(@PathVariable("id") int id){
return "asd3333";
}
}
and this is what I get when I access http://localhost:8080/area/1:
- Failed to convert value of type 'java.lang.String' to required type 'int'; nested exception is java.lang.NumberFormatException: For input string: "asd3333"]
I tested this random return just to show what is happening... The method is beeing called first with the @PathVariable = 1 from the request, and then right after that, is called again with the whethever the method resulsts, in this case, it tries to pass the @PathVariable = "asd3333".
I have NO IDEA of what tha heck is happening, pls help