My controller has the code below:
@RequestMapping(value = "/child/{nodeId}/{relType}",method = RequestMethod.GET, produces=MediaType.APPLICATION_JSON) public Iterable<Node> getConnectedNodes(@RequestParam("page")int page, @RequestParam("size")int size, @PathVariable("nodeId") String nodeId, @PathVariable("relType") String relType) { return nodeService.getConnectedNodes(nodeId, relType,page,size); }
And this is the URL of the API I'm clicking on
http: // localhost: 8080 / node / child / e17a64ff-dc2b-49b1-a995-67dba9413d67 / Collegues? page = 0 & size = 1
Here in debug mode, I can see the values โโof the path variables, i.e. nodeId and relType , but cannot see the value of the page request parameter and the size that I pass on my request in the URL above.
What happened to @RequestParam? Please, help.
java spring spring-annotations spring-mvc path-variables
mahendra kawde
source share