Exemplo n.º 1
0
  @Override
  public Object[] adapt(
      ServletContext sc, HttpServletRequest req, HttpServletResponse resp, String[] pathArgs) {

    // 临时
    if (!Mvcs.getActionContext().getMethod().toGenericString().equals(method.toGenericString())) {
      throw new IllegalArgumentException(
          String.format(
              "Method miss match: expect %s but %s. using Ioc? set singleton=false, pls",
              method, Mvcs.getActionContext().getMethod()));
    }
    return super.adapt(sc, req, resp, pathArgs);
  }