title: Spring interception
body: <p>First, I am a new to Spring and this is my first attempt to write a REST based application using Spring.</p>
  
  <p>I am planning to use Json both request parameters and in responses. This brings me to two questions.</p>
  
  <ol>
  <li><p>Is there a way to globally set <code>produces="application/json"</code> as default for all my mvc controllers responses.</p></li>
  <li><p>If anyone sends a request and expects a result in other format than <code>application/json</code>, I would like to return a error message. I guess this i a interceptors responsibility but understand how to set up the check.</p></li>
  </ol>