Post
后端接口:
@RestController
@RequestMapping("/user")
public class UserController {
@Autowired
UserService userService;
@PostMapping("login")
public Result Login(@RequestBody LoginQuery loginQuery){
Map<String, Object> loginResult = new HashMap<>();
boolean existed = userService.isExisted(loginQuery);
loginResult.put("login",existed);
return Result.ok().data(loginResult);
}
}
postman: