package com.util;
package com.util;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
final public class ApplicationContextUtil {
private static ApplicationContext ac=null;
private ApplicationContextUtil(){
}
static{
ac=new ClassPathXmlApplicationContext(“applicationContext.xml”);
}
public static ApplicationContext getApplicationContext(){
//获得返回的容器对象
return ac;
}
}
© 版权声明
文章版权归作者所有,未经允许请勿转载。