title: How to set defaults for @RequestMapping?
body: <p>I'm using <code>@RestController</code> with <code>@RequestMapping</code> annotations to define all of my servlets with <code>spring-mvc</code>.</p>
  
  <p>Question: how can I define some defaults for those annotation, so I don't have to repeat the same configuration regarding eg <code>consumes</code> and <code>produces</code>?</p>
  
  <p>I'd like to always apply the following config, without having to repeat it on each path:</p>
  
  <pre><code>@GetMapping(produces = {APPLICATION_XML_VALUE, APPLICATION_JSON_VALUE})
  
  @PostMapping(
  consumes = {APPLICATION_XML_VALUE, APPLICATION_JSON_VALUE},
  produces = {APPLICATION_XML_VALUE, APPLICATION_JSON_VALUE})
  </code></pre>