Spring最简单构建一个后台{msg:"登录成功",code:200,data:null}
一、简介
{msg:"登录成功",code:200,data:null}
二、两种请求
如果严格msg code data也带""
@RestController
@RequestMapping("/acountmanage")
public class UserCRUDController {
/**
* args:http://10.9.240.9:8088/api/admin/users?realname=&page=1&rows=1
* @return
*/
@ResponseBody
@CrossOrigin
@RequestMapping("/users")
public String adminUsers(){
//return "\"{\"msg\":\"登录成功\",\"code\":200,\"data\":null\"}";
String msg="{msg:"+"\"登录成功\""+","+"code:200"+","+"data:"+"null}";
return msg;
}
}