title: is there any way to define httpheaders in single class,interface or annotation in java?
body: <p>is there any way to define httpheaders in single class in java? It is something like creating a wrapper class for userdefined httpHeaders used in my application. instead of defining all headers in my controller method.</p>
  
  <pre><code>@PostMapping
  public &lt;ResponseEntity&lt;Book&gt;&gt; getBooks(
     @ModelAttribute("requestContext") RequestContext context, @PathVariable("bookId") String bookId,
     @RequestHeader(value="x-institute-id") String instituteId,
     @RequestHeader(value="x-customer-last-logged-time") String xCustomerLastLoggedTime,
     @RequestHeader(value="x-customer-ip-address") String xCustomerIpAddress,
     @RequestHeader(value="x-interaction-id", required=false) String xInteractionId){
  
       ---implementation
  
     }
  </code></pre>
  
  <p>So that It can be interface or annotations. Like:</p>
  
  <pre><code>public class MyApplicationHeaders{
     @RequestHeader(value="x-institute-id") String instituteId,
     @RequestHeader(value="x-customer-last-logged-time") String xCustomerLastLoggedTime,
     @RequestHeader(value="x-customer-ip-address") String xCustomerIpAddress,
     @RequestHeader(value="x-interaction-id", required=false) String xInteractionId)
  }
  </code></pre>
  
  <p>So that we can use it as :</p>
  
  <pre><code>@PostMapping
  public &lt;ResponseEntity&lt;Book&gt;&gt; getBooks(
     @ModelAttribute("requestContext") RequestContext context, @PathVariable("bookId") String bookId, @MyApplicationHeaders appHeaders{
  
       ---implementation
  
     }
  </code></pre>