Package org.springframework.aop.framework.autoproxy

Examples of org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator


  public void testProxiedStandardHandleMethod() throws Exception {
    DispatcherServlet servlet = new DispatcherServlet() {
      protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent) {
        GenericWebApplicationContext wac = new GenericWebApplicationContext();
        wac.registerBeanDefinition("controller", new RootBeanDefinition(MyController.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;
      }
View Full Code Here


    DispatcherServlet servlet = new DispatcherServlet() {
      protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent) {
        GenericWebApplicationContext wac = new GenericWebApplicationContext();
        wac.registerBeanDefinition("controller", new RootBeanDefinition(MyFormController.class));
        wac.registerBeanDefinition("viewResolver", new RootBeanDefinition(TestViewResolver.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;
      }
View Full Code Here

    DispatcherServlet servlet = new DispatcherServlet() {
      @Override
      protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent) {
        GenericWebApplicationContext wac = new GenericWebApplicationContext();
        wac.registerBeanDefinition("controller", new RootBeanDefinition(MyController.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;
      }
View Full Code Here

      @Override
      protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent) {
        GenericWebApplicationContext wac = new GenericWebApplicationContext();
        wac.registerBeanDefinition("controller", new RootBeanDefinition(MySessionAttributesControllerImpl.class));
        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;
      }
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));
        DefaultAdvisorAutoProxyCreator autoProxyCreator = new DefaultAdvisorAutoProxyCreator();
        autoProxyCreator.setBeanFactory(wac.getBeanFactory());
        wac.getBeanFactory().addBeanPostProcessor(autoProxyCreator);
        wac.getBeanFactory()
            .registerSingleton("advisor", new DefaultPointcutAdvisor(new SimpleTraceInterceptor()));
        wac.refresh();
        return wac;
View Full Code Here

    DispatcherServlet servlet = new DispatcherServlet() {
      @Override
      protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent) {
        GenericWebApplicationContext wac = new GenericWebApplicationContext();
        wac.registerBeanDefinition("controller", new RootBeanDefinition(IMyControllerImpl.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;
      }
View Full Code Here

      @Override
      protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent)
          throws BeansException {
        GenericWebApplicationContext wac = new GenericWebApplicationContext();
        wac.registerBeanDefinition("controller", new RootBeanDefinition(controllerclass));
        DefaultAdvisorAutoProxyCreator autoProxyCreator = new DefaultAdvisorAutoProxyCreator();
        autoProxyCreator.setProxyTargetClass(true);
        autoProxyCreator.setBeanFactory(wac.getBeanFactory());
        wac.getBeanFactory().addBeanPostProcessor(autoProxyCreator);
        wac.getBeanFactory().registerSingleton("advisor", new DefaultPointcutAdvisor(new SimpleTraceInterceptor(true)));
        wac.refresh();
        return wac;
      }
View Full Code Here

  public void sessionAttributeExposureWithInterface() throws Exception {
    initServlet(new ApplicationContextInitializer<GenericWebApplicationContext>() {
      @Override
      public void initialize(GenericWebApplicationContext context) {
        context.registerBeanDefinition("viewResolver", new RootBeanDefinition(ModelExposingViewResolver.class));
        DefaultAdvisorAutoProxyCreator autoProxyCreator = new DefaultAdvisorAutoProxyCreator();
        autoProxyCreator.setBeanFactory(context.getBeanFactory());
        context.getBeanFactory().addBeanPostProcessor(autoProxyCreator);
        context.getBeanFactory().registerSingleton("advisor", new DefaultPointcutAdvisor(new SimpleTraceInterceptor()));
      }
    }, MySessionAttributesControllerImpl.class);
View Full Code Here

  public void proxiedFormController() throws Exception {
    initServlet(new ApplicationContextInitializer<GenericWebApplicationContext>() {
      @Override
      public void initialize(GenericWebApplicationContext wac) {
        wac.registerBeanDefinition("viewResolver", new RootBeanDefinition(TestViewResolver.class));
        DefaultAdvisorAutoProxyCreator autoProxyCreator = new DefaultAdvisorAutoProxyCreator();
        autoProxyCreator.setBeanFactory(wac.getBeanFactory());
        wac.getBeanFactory().addBeanPostProcessor(autoProxyCreator);
        wac.getBeanFactory()
            .registerSingleton("advisor", new DefaultPointcutAdvisor(new SimpleTraceInterceptor()));
      }
    }, MyFormController.class);
View Full Code Here

  @Test
  public void requestMappingInterfaceWithProxy() throws Exception {
    initServlet(new ApplicationContextInitializer<GenericWebApplicationContext>() {
      @Override
      public void initialize(GenericWebApplicationContext wac) {
        DefaultAdvisorAutoProxyCreator autoProxyCreator = new DefaultAdvisorAutoProxyCreator();
        autoProxyCreator.setBeanFactory(wac.getBeanFactory());
        wac.getBeanFactory().addBeanPostProcessor(autoProxyCreator);
        wac.getBeanFactory().registerSingleton("advisor", new DefaultPointcutAdvisor(new SimpleTraceInterceptor()));
      }
    }, IMyControllerImpl.class);
View Full Code Here

TOP

Related Classes of org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator

Copyright © 2018 www.massapicom. 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.