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

📄 daoconfig.java

📁 >项目名称:电脑电子商务平台 >1.运行环境JDK1.6+Oracle10g+Tomcat5.5 >2.开发工具: MyEclipse Enterprise Workbench
💻 JAVA
字号:
package omega.persistence.sqlmapdao;

import java.io.IOException;
import java.io.Reader;

import com.ibatis.common.resources.Resources;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapClientBuilder;

public class DaoConfig {
	private static SqlMapClient sqlMapper;
	static {
		try {
			Reader reader = Resources
					.getResourceAsReader("omega/persistence/sqlmapdao/sql/SqlMapConfig.xml");
			sqlMapper = SqlMapClientBuilder.buildSqlMapClient(reader);
			reader.close();
		} catch (IOException e) {
			// Fail fast.
			throw new RuntimeException(
					"Something bad happened while building the SqlMapClient instance."
							+ e, e);
		}
	}
	
	public static SqlMapClient getsqlMapper()
	{
		return sqlMapper;
		}
}

⌨️ 快捷键说明

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