Writing external http interfaces with Spring

Yay. Using Springs @RequestBody and @ResponseBody is a delight. Everything magically appears and sorta works. One thing baffled me though, the StringHttpMessageConverter which is used behind the scenes assumes all input is ISO-8859-1. How lame, get with the program, it’s 2011. Changing this is not as easy as you would assume it would be with Spring. As the charset is a constructor parameter, a setter is not a possibility. So, the result was a Utf8StringHttpMessageConverter reimplementation of the interfaces :P

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>