public View match(ActionContext context) {
String appId = Strings.sNull(context.getRequest().getParameter("appId"));
String token = Strings.sNull(context.getRequest().getParameter("token"));
if (!apiService.verifyToken(appId, token)) {
return new UTF8JsonView(JsonFormat.compact()).setData(Result.error(-1,"token invalid"));
}
return null;
}
String appId = Strings.sNull(context.getRequest().getParameter("appId"));
这个不能接收JSON,只能序列化了之后才才能接收