2020
10-09
10-09
vue 调用 RESTful风格接口操作
首先是简单的java接口代码写了四个让前端请求的接口,以下为代码@GetMapping("/v1/user/{username}/{password}")publicResultlogin2(@PathVariable("username")Stringusername,@PathVariable("password")Stringpassword){returnResult.succResult(200,username+"--"+password);}@PostMapping("/v1/user")publicResultlogin3(@RequestBodyUseruser){returnResult.succResult(200,"ok",user);}...
继续阅读 >