rest-style reception url

One.

@PathVariable annotation string above will {} in comparison with their string, if the same put {} corresponding to their modified values ​​to the variable

    @RequestMapping(value="/b/{name}")
    public String a(@PathVariable("name") String name) {
        System.out.println(name);
        return "b";
    }

 

Guess you like

Origin www.cnblogs.com/lollong/p/11075379.html