服务端:
http://127.0.0.1:8080/restful/user
服务端Controlle代码:
package com.test.springboot;
import java.util.HashMap;
import java.util.Map;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@RequestMapping("/restful/user")
@Controller
public class usersCon {
private static Map<String,UserInfo> map=new HashMap<String,UserInfo>();
UserInfo u=new UserInfo("11","aa","cc");
@RequestMapping(value="{id}",method = Re