@SuppressWarnings("serial")
DispatcherServlet servlet = new DispatcherServlet() {
protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent) {
GenericWebApplicationContext wac = new GenericWebApplicationContext();
wac.registerBeanDefinition("controller", new RootBeanDefinition(MyMethodNameDispatchingController.class));
InternalPathMethodNameResolver methodNameResolver = new InternalPathMethodNameResolver();
methodNameResolver.setSuffix("Handle");
RootBeanDefinition adapterDef = new RootBeanDefinition(AnnotationMethodHandlerAdapter.class);
adapterDef.getPropertyValues().addPropertyValue("methodNameResolver", methodNameResolver);
wac.registerBeanDefinition("handlerAdapter", adapterDef);
wac.refresh();
return wac;