Package core

Examples of core.Bank.credit()


public class XmlAopDemo {

  public static void main(String[] args) {
    ApplicationContext context = new ClassPathXmlApplicationContext("demo/xml/config.xml");
    Bank bank = context.getBean(Bank.class);
    bank.credit("abc", 100);
  }

}
View Full Code Here


    LoggingAdvice advice = new LoggingAdvice();
    ProxyFactory pf = new ProxyFactory(target);
    pf.addAdvice(advice);
    Bank bank = (Bank) pf.getProxy();
    bank.debit("abc", 100);
    bank.credit("abc", 200);
  }

}
View Full Code Here

public class AnnotationDemo {

  public static void main(String[] args) {
    ApplicationContext context = new ClassPathXmlApplicationContext("config.xml", AnnotationDemo.class);
    Bank bank = context.getBean(Bank.class);
    bank.credit("abc", 100);
    bank.debit("abc", 99.99);
  }

}
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.