Package core

Examples of core.GreetingService


public class SpringXmlDemo {

  public static void main(String[] args) {
    ApplicationContext context = new ClassPathXmlApplicationContext("demo/xml/beans.xml");
    GreetingService service = context.getBean(GreetingService.class);
    service.greet("World");
  }
View Full Code Here


public class SpringAnnotationDemo {

  public static void main(String[] args) {
    ApplicationContext context = new AnnotationConfigApplicationContext(Beans.class);
    GreetingService service = context.getBean(GreetingService.class);
    service.greet("World");
  }
View Full Code Here

public class ComponentScanDemo {

  public static void main(String[] args) {
    ApplicationContext context = new ClassPathXmlApplicationContext("config.xml", ComponentScanDemo.class);
    GreetingService service = context.getBean(GreetingService.class);
    service.greet("World");
  }
View Full Code Here

TOP

Related Classes of core.GreetingService

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.