Package demo.scan

Source Code of demo.scan.ComponentScanDemo

package demo.scan;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import core.GreetingService;

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");
  }
}
TOP

Related Classes of demo.scan.ComponentScanDemo

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.