如题,在网上查了半天,没怎么看懂。
谁能给个简单的解释或者给个简单的例子。
假如一个url请求localhost:8080/base/getUser
获得一个User类的json,算不算是restful?
------解决思路----------------------
@RequestMapping(value = "test/{arg1}/{arg2}")
public String test(@PathVariable String arg1,@PathVariable String arg2){
//请求的url为 localhost:8080/test/abc/def
//获取到的参数arg1 : abc
//获取到的参数arg2 : def
return "";
}