I have a none standard Spring MVC project. Responding with XMLs. Is it possible to create a view (jsp page) showing all controllers, mappings and parameters that are accepted (required and not).
Based on answer,I have:
@RequestMapping(value= "/endpoints", params="secure", method = RequestMethod.GET)
public @ResponseBody
String getEndPointsInView() {
String result = "";
for (RequestMappingInfo element : requestMappingHandlerMapping.getHandlerMethods().keySet()) {
result += "<p>" + element.getPatternsCondition() + "<br>";
result += element.getMethodsCondition() + "<br>";
result += element.getParamsCondition() + "<br>";
result += element.getConsumesCondition() + "<br>";
}
return result;
}
I don't get any information from @RequestParam
@RequestMapping
and params=something. Do you know how to access the fields in@RequestMapping
(required and optinal)? - Man, I suck at stackoverflow editing – mamruoc Mar 22 '12 at 16:07