AppContext.java
上传用户:yunfeng252
上传日期:2022-07-23
资源大小:12403k
文件大小:1k
- package org.yufeng.utils;
- import org.springframework.context.support.*;
- public class AppContext {
- private static AppContext instance;
- private AbstractApplicationContext appContext;
- public synchronized static AppContext getInstance() {
- if (instance == null) {
- instance = new AppContext();
- }
- return instance;
- }
- private AppContext() {
- this.appContext = new ClassPathXmlApplicationContext(
- "ApplicationContext.xml");
- }
- public AbstractApplicationContext getAppContext() {
- return appContext;
- }
- }