1@GetMapping("/api/employeeswithmapvariable/{id}/{name}")
2@ResponseBody
3public String getEmployeesByIdAndNameWithMapVariable(@PathVariable Map<String, String> pathVarsMap) {
4 String id = pathVarsMap.get("id");
5 String name = pathVarsMap.get("name");
6 if (id != null && name != null) {
7 return "ID: " + id + ", name: " + name;
8 } else {
9 return "Missing Parameters";
10 }
11}