I’d like to be able to create a page that lists off the mappings that were discovered by controllers annotated with @Controller. I’m doing this for REST services that allows us to easily find the endpoints available to the instance on a page.
So far I’ve manually been doing this, though if it’s possible to create a controller that publishes this in a pleasant format nicely it would be greatly beneficial.
Key information I’m after is
- Endpoint URI
- Method (
GET|POST|DELETE|...) - Params
- Headers
Having access to this information where I could create a JSP view would be ideal.
With Spring 3.1, there is a new feature referred to as “end point documentation”. The only thing I could find was some code in the spring-mvc-31-demo sample app. Refer to the example controller and JSP. Seems pretty straight forward.