加载spring容器
import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; /** * * 加载spring容器 **/ public class SpringUtil { public static ApplicationContext context; static{ context = new ClassPathXmlApplicationContext("spring/applicationContext-dao.xml"); } }