public static void main(String[] args) {
ApplicationContext ac = new AnnotationConfigApplicationContext(SpringConfig.class);
}
//加载配置类初始化容器
ApplicationContext ac = new AnnotationConfigApplicationContext(SpringConfig.class);
//加载配置文件初始化容器
ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");