JAX-RS Jersey integration with Spring MVC | voxofthought
The application currently uses the Spring MVC framework to render UI (HTML/JS) and manage restful endpoints(JSON payload).
Simple enough in Spring MVC. However, when I had to document it, I ran into a problem: As much as I hate WADL, there isn't a standard way to document RESTful interfaces. Since Spring MVC isn't compliant with the JAX-RS spec, I had to find a workaround. I ran across this excellent blog post on that topic: http://nurkiewicz.blogspot.com/2012/02/automatically-generating-wadl-in-spring.html
It seemed straight forward enough, but I still wasn't convinced that so many things have to be done just to generate documentation. Wonder why the Javadoc does not have an extension to generate RESTful services documentation.??
I decided to fork the application into 2 parts – the web interface will be managed by the Spring MVC framework and the RESTful endpoints managed by the Jersey implementation of JAX-RS (this can be substituted for any other stack).
Read full article from JAX-RS Jersey integration with Spring MVC | voxofthought
No comments:
Post a Comment