how to pass path parameter in url in spring rest

Solutions on MaxInterview for how to pass path parameter in url in spring rest by the best coders in the world

showing results for - "how to pass path parameter in url in spring rest"
Sara
17 Mar 2017
1    @RequestMapping(method = RequestMethod.GET, value = "/custom")
2    public String controllerMethod(@RequestParam Map<String, String> customQuery) {
3
4        System.out.println("customQuery = brand " + customQuery.containsKey("brand"));
5        System.out.println("customQuery = limit " + customQuery.containsKey("limit"));
6        System.out.println("customQuery = price " + customQuery.containsKey("price"));
7        System.out.println("customQuery = other " + customQuery.containsKey("other"));
8        System.out.println("customQuery = sort " + customQuery.containsKey("sort"));
9
10        return customQuery.toString();
11    }