Package com.jverstry.IoCContainer

Source Code of com.jverstry.IoCContainer.IoCContainerExample

package com.jverstry.IoCContainer;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class IoCContainerExample {
 
  public static void main(String[] args) {
   
    AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
    ctx.scan("com.jverstry");
    ctx.refresh();   
   
    MyServices mcs = ctx.getBean(MyServices.class);
    System.out.println("Data: " + mcs.getMyService().getData());
   
  }
 
}
TOP

Related Classes of com.jverstry.IoCContainer.IoCContainerExample

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.