Package us.codecraft.tinyioc.context

Examples of us.codecraft.tinyioc.context.ClassPathXmlApplicationContext


public class JdkDynamicAopProxyTest {

  @Test
  public void testInterceptor() throws Exception {
    // --------- helloWorldService without AOP
    ApplicationContext applicationContext = new ClassPathXmlApplicationContext("tinyioc.xml");
    HelloWorldService helloWorldService = (HelloWorldService) applicationContext.getBean("helloWorldService");
    helloWorldService.helloWorld();

    // --------- helloWorldService with AOP
    // 1. 设置被代理对象(Joinpoint)
    AdvisedSupport advisedSupport = new AdvisedSupport();
View Full Code Here


public class Cglib2AopProxyTest {

  @Test
  public void testInterceptor() throws Exception {
    // --------- helloWorldService without AOP
    ApplicationContext applicationContext = new ClassPathXmlApplicationContext("tinyioc.xml");
    HelloWorldService helloWorldService = (HelloWorldService) applicationContext.getBean("helloWorldService");
    helloWorldService.helloWorld();

    // --------- helloWorldService with AOP
    // 1. 设置被代理对象(Joinpoint)
    AdvisedSupport advisedSupport = new AdvisedSupport();
View Full Code Here

TOP

Related Classes of us.codecraft.tinyioc.context.ClassPathXmlApplicationContext

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.