static Map<String, String> resolveHeaders(Method method) {
    Map<String, String> headerMap = new HashMap<>();
    for (Header header : method.getDeclaringClass().getAnnotationsByType(Header.class)) {
      headerMap.put(header.name(), header.value());
    }
    for (Header header : method.getAnnotationsByType(Header.class)) {
      headerMap.put(header.name(), header.value());
    }
    return headerMap;
  }
static Map < String , String > resolveHeaders ( Method method ) { Map < String , String > headerMap = new HashMap < > ( ) ; for ( Header header : method . getDeclaringClass ( ) . getAnnotationsByType ( Header . class ) ) { headerMap . put ( header . name ( ) , header . value ( ) ) ; } for ( Header header : method . getAnnotationsByType ( Header . class ) ) { headerMap . put ( header . name ( ) , header . value ( ) ) ; } return headerMap ; }
解析请求头