`

ConnDataBase

    博客分类:
  • java
阅读更多

package com.cx.lzf.mofan.common;

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 ConnDataBase
{
    private static SqlMapClient sqlMapper;
   
    public static SqlMapClient getsqlMapper()
    {
        try
        {
            Reader reader = Resources.getResourceAsReader("com/cx/lzf/mofan/configxml/SqlMapConfig.xml");
            sqlMapper = SqlMapClientBuilder.buildSqlMapClient(reader);
            reader.close();
            return sqlMapper;
        }
        catch (IOException e)
        {
            throw new RuntimeException("Something bad happened while building the SqlMapClient instance." + e, e);
        }
    }
}

分享到:
评论
发表评论

文章已被作者锁定,不允许评论。

相关推荐

Global site tag (gtag.js) - Google Analytics