/*

 * OS: Windows 10

 * STS Version: sts-3.9.5.RELEASE

 * Project: Spring Legacy Project

 * Title: main 함수에서 getBean 사용

 */


String myConfig = "classpath:myapplication.xml";

AbstractApplicationContext ctx = new GenericXmlApplicationContext(myConfig);

MyClass myClass = ctx.getBean("myClass", MyClass.class);



728x90

+ Recent posts