-
Jul 17th, 2012, 07:17 AM
#1
Response and Request formats.
Hi
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.
1. Is there a way to set produces="application/json" as default for all my mvc controllers.
2. If anyone sends a request with others formats than application/json,,, I would like to return a error message. If the client set the Accept header to application/xml,,, my spring still returns json,, with no futher infomation.
//regards
//lg
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules