The ControllerClassNameHandlerMapping
is mapping:
/navigation/* -> NavigationController.
If you remove it, the NavigationController is never executed and lost any chances to map the url to a method.
The workflow is:
DispatcherServlet -> ControllerClassNameHandlerMapping
-> NavigationController -> MethodNameResolver -> method
Edit
For example if you want to map "menu" directy to menuHandler method you could use the following MethodNameResolver
public class LastPathNameMethodResolver extends AbstractUrlMethodNameResolver {
private Properties mappings;
@Override
protected String getHandlerMethodNameForUrlPath(String urlPath) {
return mappings.getProperty(StringUtils.substringAfterLast(urlPath, "/"));
}
public Properties getMappings() {
return mappings;
}
public void setMappings(Properties mappings) {
this.mappings = mappings;
}