Package org.springframework.web.context.support

Examples of org.springframework.web.context.support.GenericWebApplicationContext.refresh()


        wbiDef.getPropertyValues().add("conversionService", csDef);
        wbiDef.getPropertyValues().add("propertyEditorRegistrars", new RootBeanDefinition(ListEditorRegistrar.class));
        RootBeanDefinition adapterDef = new RootBeanDefinition(AnnotationMethodHandlerAdapter.class);
        adapterDef.getPropertyValues().add("webBindingInitializer", wbiDef);
        wac.registerBeanDefinition("handlerAdapter", adapterDef);
        wac.refresh();
        return wac;
      }
    };
    servlet.init(new MockServletConfig());
View Full Code Here


        wac.registerBeanDefinition("viewResolver", new RootBeanDefinition(ModelExposingViewResolver.class));
        DefaultAdvisorAutoProxyCreator autoProxyCreator = new DefaultAdvisorAutoProxyCreator();
        autoProxyCreator.setBeanFactory(wac.getBeanFactory());
        wac.getBeanFactory().addBeanPostProcessor(autoProxyCreator);
        wac.getBeanFactory().registerSingleton("advisor", new DefaultPointcutAdvisor(new SimpleTraceInterceptor()));
        wac.refresh();
        return wac;
      }
    };
    servlet.init(new MockServletConfig());
View Full Code Here

      @Override
      protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent) {
        GenericWebApplicationContext wac = new GenericWebApplicationContext();
        wac.registerBeanDefinition("controller", new RootBeanDefinition(MyParameterizedControllerImpl.class));
        wac.registerBeanDefinition("viewResolver", new RootBeanDefinition(ModelExposingViewResolver.class));
        wac.refresh();
        return wac;
      }
    };
    servlet.init(new MockServletConfig());
View Full Code Here

      protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent) {
        GenericWebApplicationContext wac = new GenericWebApplicationContext();
        wac.registerBeanDefinition("controller",
            new RootBeanDefinition(MyParameterizedControllerImplWithOverriddenMappings.class));
        wac.registerBeanDefinition("viewResolver", new RootBeanDefinition(ModelExposingViewResolver.class));
        wac.refresh();
        return wac;
      }
    };
    servlet.init(new MockServletConfig());
View Full Code Here

    servlet = new DispatcherServlet() {
      @Override
      protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent) {
        GenericWebApplicationContext wac = new GenericWebApplicationContext();
        wac.registerBeanDefinition("controller", new RootBeanDefinition(controllerClass));
        wac.refresh();
        return wac;
      }
    };
    servlet.init(new MockServletConfig());
  }
View Full Code Here

      @Override
      protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent) {
        GenericWebApplicationContext wac = new GenericWebApplicationContext();
        wac.registerBeanDefinition("controller", new RootBeanDefinition(MyFormController.class));
        wac.registerBeanDefinition("viewResolver", new RootBeanDefinition(TestViewResolver.class));
        wac.refresh();
        return wac;
      }
    };
    servlet.init(new MockServletConfig());
View Full Code Here

      @Override
      protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent) {
        GenericWebApplicationContext wac = new GenericWebApplicationContext();
        wac.registerBeanDefinition("controller", new RootBeanDefinition(MyModelFormController.class));
        wac.registerBeanDefinition("viewResolver", new RootBeanDefinition(TestViewResolver.class));
        wac.refresh();
        return wac;
      }
    };
    servlet.init(new MockServletConfig());
View Full Code Here

        DefaultAdvisorAutoProxyCreator autoProxyCreator = new DefaultAdvisorAutoProxyCreator();
        autoProxyCreator.setBeanFactory(wac.getBeanFactory());
        wac.getBeanFactory().addBeanPostProcessor(autoProxyCreator);
        wac.getBeanFactory()
            .registerSingleton("advisor", new DefaultPointcutAdvisor(new SimpleTraceInterceptor()));
        wac.refresh();
        return wac;
      }
    };
    servlet.init(new MockServletConfig());
View Full Code Here

            new RootBeanDefinition(MyCommandProvidingFormController.class));
        wac.registerBeanDefinition("viewResolver", new RootBeanDefinition(TestViewResolver.class));
        RootBeanDefinition adapterDef = new RootBeanDefinition(AnnotationMethodHandlerAdapter.class);
        adapterDef.getPropertyValues().add("webBindingInitializer", new MyWebBindingInitializer());
        wac.registerBeanDefinition("handlerAdapter", adapterDef);
        wac.refresh();
        return wac;
      }
    };
    servlet.init(new MockServletConfig());
View Full Code Here

        wac.registerBeanDefinition("viewResolver", new RootBeanDefinition(TestViewResolver.class));
        RootBeanDefinition adapterDef = new RootBeanDefinition(AnnotationMethodHandlerAdapter.class);
        adapterDef.getPropertyValues().add("webBindingInitializer", new MyWebBindingInitializer());
        adapterDef.getPropertyValues().add("customArgumentResolver", new MySpecialArgumentResolver());
        wac.registerBeanDefinition("handlerAdapter", adapterDef);
        wac.refresh();
        return wac;
      }
    };
    servlet.init(new MockServletConfig());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.