If your web application already uses Spring MVC, then it's easy: the project jsondoc-springmvc already does it for you, so you need to include both jsondoc-core and jsondoc-springmvc dependencies.
Configure JSONDoc controller
The only thing to do on your side is to declare the jsondoc controller in your spring context.xml file:
In this case the documentation will be generated at http://localhost:8080/api/jsondoc. You only have to specify the api version and the base path to give you readers a better information.
Change the base path of your web application, or better put a placeholder here and in the pom.xml and filter this file to have it replaced for free for different environments
In the packages list property you should put packages that contain spring controllers and objects needed for the documentation generation, as far as they are on the classpath. The scan is recursive.
See Configuration for more information about how to configure the JSONDoc controller.
Display the generated docs
You can include the jsondoc-ui project in your web application. This provides an interface to browse the generated documentation and a playground to test methods. It is built on Twitter Bootstrap and can be easily customized for you needs. To do this you need to get the jsondoc-ui jar, extract it and copy css, js, font, jsondoc-ui.html to your project's webapp folder. Check out the live demo here or the sample applications code. Here is the dependency to the jsondoc-ui:
Build your own viewer
If you are not satisfied with the standard interface, you can use the generated JSON documentation in a fully customized interface!