Spring+Hibernate: How to convert entities to XML/JSON?
Spring makes it remarkably easy to write controllers which return XML or JSON response. Simply add the annotation @ResponseBody
to your controller definition and you are done. Whatever you will return from your controller method will…