How to reflectively get list of all controllers (best if not only annotated, but also specified in xml), matching some specfic url in your Spring MVC application?
In case of annotated-only,
@Autowired
private ListableBeanFactory listableBeanFactory;
...
whatever() {
Map<String,Object> beans = listableBeanFactory.getBeansWithAnnotation(RequestMapping.class);
// iterate beans and compare RequestMapping.value() annotation parameters
// to produce list of matching controllers
}
could be used, but what to do in more general case, when controllers may be specified in spring.xml config? And what to do with request-path parameters?