develog

ApplicationContext 가져오는 방법 본문

Dev/Java

ApplicationContext 가져오는 방법

냐옴 2012. 12. 4. 11:52

public void getApplicationContext1() {

    ApplicationContext context = new ClassPathXmlApplicationContext("classpath:spring-config.xml");

    System.out.println(">> getApplicationContext1() : " + context);

}


public void getApplicationContext2() {

    ApplicationContext context = new FileSystemXmlApplicationContext("classpath:spring-config.xml");

    System.out.println(">> getApplicationContext2() : " + context);

}


public void getApplicationContext2() {

    ApplicationContext context = new FileSystemXmlApplicationContext("src/spring-config.xml");

    System.out.println(">> getApplicationContext2() : " + context);

}


'Dev > Java' 카테고리의 다른 글

Quartz cron expression test  (0) 2012.12.04
Quartz Test  (0) 2012.12.04
DTD-style vs Xml Schem-style in Spring 2.5  (0) 2012.12.04
ant 에서 ssh 사용  (0) 2012.12.01
SQL Developer 에러 조치  (0) 2012.11.27
Comments