@Override
  protected void registerParamAnnotations() {
    super.registerParamAnnotations();

    registerParameterAnnotation(
        BeanParam.class,
        (param, data, paramIndex) -> {
          final Field[] aggregatedParams =
              data.method().getParameters()[paramIndex].getType().getDeclaredFields();

          for (Field aggregatedParam : aggregatedParams) {

            if (aggregatedParam.isAnnotationPresent(PathParam.class)) {
              final String name = aggregatedParam.getAnnotation(PathParam.class).value();
              checkState(
                  emptyToNull(name) != null,
                  "BeanParam parameter %s contains PathParam with empty .value() on field %s",
                  paramIndex,
                  aggregatedParam.getName());
              nameParam(data, name, paramIndex);
            }

            if (aggregatedParam.isAnnotationPresent(QueryParam.class)) {
              final String name = aggregatedParam.getAnnotation(QueryParam.class).value();
              checkState(
                  emptyToNull(name) != null,
                  "BeanParam parameter %s contains QueryParam with empty .value() on field %s",
                  paramIndex,
                  aggregatedParam.getName());
              final String query = addTemplatedParam(name);
              data.template().query(name, query);
              nameParam(data, name, paramIndex);
            }

            if (aggregatedParam.isAnnotationPresent(HeaderParam.class)) {
              final String name = aggregatedParam.getAnnotation(HeaderParam.class).value();
              checkState(
                  emptyToNull(name) != null,
                  "BeanParam parameter %s contains HeaderParam with empty .value() on field %s",
                  paramIndex,
                  aggregatedParam.getName());
              final String header = addTemplatedParam(name);
              data.template().header(name, header);
              nameParam(data, name, paramIndex);
            }

            if (aggregatedParam.isAnnotationPresent(FormParam.class)) {
              final String name = aggregatedParam.getAnnotation(FormParam.class).value();
              checkState(
                  emptyToNull(name) != null,
                  "BeanParam parameter %s contains FormParam with empty .value() on field %s",
                  paramIndex,
                  aggregatedParam.getName());
              data.formParams().add(name);
              nameParam(data, name, paramIndex);
            }
          }
        });
  }
Please refer to the <a href="https://github.com/Netflix/feign/tree/master/feign-jaxrs2">Feign
JAX-RS 2 README</a>.
jaxrs2/src/main/java/feign/jaxrs2/JAXRS2Contract.java