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