@Test public void testWorkingInterceptor() throws Throwable { Simple_MyServiceInterface_Impl simple_MyServiceInterface_Impl = (Simple_MyServiceInterface_Impl) processor.postProcessAfterInitialization(beanFactory.getBean("simple_MyServiceInterface_Impl"), "simple_MyServiceInterface_Impl"); Assert.assertTrue(simple_MyServiceInterface_Impl.sayGoodBye().equals("Good bye_hello_world")); Assert.assertTrue(simple_MyServiceInterface_Impl.sayHello().equals("Hello_hello_world")); Assert.assertTrue(simple_MyServiceInterface_Impl.sayHello("Geek").equals("Geek_hello_world")); }
@Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (metaData.isInterceptedBean(beanName)) { return createProxyForBean(beanName, bean); } else { return bean; } }
InterceptorAwareBeanPostProcessor implements BeanPostProcessor { @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (metaData.isInterceptedBean(beanName)) { return createProxyForBean(beanName, bean); } else { return bean; } } }
InterceptorAwareBeanPostProcessor implements BeanPostProcessor { @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (metaData.isInterceptedBean(beanName)) { return createProxyForBean(beanName, bean); } else { return bean; } } InterceptorAwareBeanPostProcessor();  InterceptorAwareBeanPostProcessor(InterceptorMetaDataBean metaData, ConfigurableListableBeanFactory beanFactory); }
InterceptorAwareBeanPostProcessor implements BeanPostProcessor { @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (metaData.isInterceptedBean(beanName)) { return createProxyForBean(beanName, bean); } else { return bean; } } InterceptorAwareBeanPostProcessor();  InterceptorAwareBeanPostProcessor(InterceptorMetaDataBean metaData, ConfigurableListableBeanFactory beanFactory); @Override Object postProcessAfterInitialization(Object bean, String beanName); @Override Object postProcessBeforeInitialization(Object bean, String beanName); }
InterceptorAwareBeanPostProcessor implements BeanPostProcessor { @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (metaData.isInterceptedBean(beanName)) { return createProxyForBean(beanName, bean); } else { return bean; } } InterceptorAwareBeanPostProcessor();  InterceptorAwareBeanPostProcessor(InterceptorMetaDataBean metaData, ConfigurableListableBeanFactory beanFactory); @Override Object postProcessAfterInitialization(Object bean, String beanName); @Override Object postProcessBeforeInitialization(Object bean, String beanName);  }