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"); } }
原文地址:https://www.cnblogs.com/inspred/p/8908717.html
时间: 2024-10-14 19:22:01