springMVC receives get request passing multiple parameters

@RequestMapping(value = "/sendSignal/{state}/{limberId}/{account}", method = RequestMethod.GET)
    @ResponseBody
    public Map <String, Object> signal (athPathVariable int state, athPathVariable String limberId, athPathVariable String account)
        System.out.println("参数:"+state+"/"+limberId+"/"+account);
        Map<String, Object> map = new HashMap<String, Object>();
       
        return map;
    }

When there are multiple parameters, the @PathVariable annotation needs to be added before each variable, otherwise the parameters passed to the method are empty;

There is a one-to-one correspondence between variable names and locations.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326617029&siteId=291194637