⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 springutil.java

📁 用struts,spring实现网上商店的功能!!
💻 JAVA
字号:
package shopping.util;

import org.springframework.context.support.*;

import shopping.util.BaseAction;

/**
 * <p>
 * Title: KnowledgeManagement
 * </p>
 * 
 * <p>
 * Description:
 * </p>
 * 
 * <p>
 * Copyright: Copyright (c) 2009
 * </p>
 * 
 * <p>
 * Company: GZ-Giant
 * </p>
 * 
 * @author Alan
 * @version 2.0
 */
public class SpringUtil {
	private static SpringUtil instance;

	private static AbstractApplicationContext appContext;

	public synchronized static SpringUtil getInstance() {
		if (instance == null) {
			instance = new SpringUtil();
		}
		return instance;
	}

	private SpringUtil() {
		String paths[] = { "/applicationContext.xml",
		// "/applicationContext-yu.xml"
		};
		this.appContext = new ClassPathXmlApplicationContext(paths);
	}

	public static AbstractApplicationContext getAppContext() {
		return appContext;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -