Licoy/encrypt-body-spring-boot-starter

请问在控制器中,每个请求的返回值必须是 String 吗?

yuandoudou928 opened this issue · 3 comments

    @ApiOperation("登录")
    @PostMapping("/loginUser")
    public ResultVo loginUser(@Validated @RequestBody LoginUserForm userForm) {
        if (userService.loginUser(userForm)) {
            return ResultVoUtil.success();
        } else {
            return ResultVoUtil.error(ResultEnum.ADD_ERROR);
        }
    }
Licoy commented

可以是对象,会对对象进行JSON序列化