now getting SqlMapClient:
SqlAppConfig.java
/**
*
*/
package com.dingfei.config;
import java.io.Reader;
import com.ibatis.common.resources.Resources;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapClientBuilder;
/**
* @author Jeffy
*
*/
public class SqlAppConfig {
private static final SqlMapClient sqlMap;
static {
try {
String resource = "conf/SqlMapConfig.xml";
Reader reader = Resources.getResourceAsReader(resource);
sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);
reader.close();
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(
"Error initializing MyAppSqlConfig class. Cause: " + e);
}
}
public static SqlMapClient getSqlMapInstance() {
return sqlMap;
}
}
分享到:
相关推荐
This abates some of the initial nuisance of setting up objects and configuration files to interact with database tables. Ibator seeks to make a major impact on the large percentage of database ...
将IBatis.NET 1.92 1.6.2版本的库在.NET 4.0下应用。...2 采用VS2010旗舰版的IDE环境生成解决方案 本次修改时参考了“笨无知”的一篇博文,再次表示感谢。 阳光萨满(wocy) 2011.08.19 susuaman@gmail.com
详细说明:自动根据数据库脚本生成java的POJO,DAO,DAOIMPL,IBATIS配置文件,spring配置文件-Database scripts automatically generate java POJO, DAO, DAOIMPL, IBATIS configuration file, spring configuration ...
│ │ │ frame-sourcefiles-org.apache.ibatis.logging.log4j2.html │ │ │ frame-sourcefiles-org.apache.ibatis.logging.nologging.html │ │ │ frame-sourcefiles-org.apache.ibatis.logging.slf4j.html │ ...
This lessens the initial nuisance of setting up objects and configuration files to interact with database tables. MBG seeks to make a major impact on the large percentage of database operations that ...
Jar package source code, there is not much configuration is simple the spring + Ibatis + struts project
步骤2: 添加WebEngine模块在QtCreaor的项目资源管理器中,找到项日文件夹中的,oro文件。右键单未该文件并选择“编辑”。在打开的,0文件中,找到"“OT+=widaets”这并在其下方添加加以下代码: mybatis-plus: ...
2. Configuration.xml 里面 的是包含要映射的类的xml配置文件。 3. 在User.xml 文件里面 主要是定义各种SQL 语句,以及这些语句的参数,以及要返回的类型等. 开始测试 在test_src 源码目录下建立com.yihaomen.test...
nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.IllegalStateException: Cannot enable lazy loading because CGLIB is not ...
This lessens the initial nuisance of setting up objects and configuration files to interact with database tables. MBG seeks to make a major impact on the large percentage of database operations that ...
12.5.1. iBATIS 1.x和2.x的概览与区别 12.5.2. iBATIS SQL Maps 1.x 12.5.3. iBATIS SQL Maps 2.x 12.6. JPA 12.6.1. 在Spring环境中建立JPA 12.6.2. JpaTemplate 和 JpaDaoSupport 12.6.3. 基于原生的JPA实现...
12.5.1. iBATIS 1.x和2.x的概览与区别 12.5.2. iBATIS SQL Maps 1.x 12.5.2.1. 创建SqlMap 12.5.2.2. 使用 SqlMapTemplate 和 SqlMapDaoSupport 12.5.3. iBATIS SQL Maps 2.x 12.5.3.1. 创建SqlMapClient 12.5.3.2....
12.5.1. iBATIS 1.x和2.x的概览与区别 12.5.2. iBATIS SQL Maps 1.x 12.5.3. iBATIS SQL Maps 2.x 12.6. JPA 12.6.1. 在Spring环境中建立JPA 12.6.2. JpaTemplate 和 JpaDaoSupport 12.6.3. 基于原生的JPA实现...
2、创建generatorConfig.xml文件,安装好mybatis 就能创建generatorConfig.xml 3、配置generatorConfig.xml配置文件,详细如下 [html] view plain copy <?xml version="1.0" encoding="UTF-8" ?> <!...
Caused by: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 99; columnNumber: 17; 元素类型为 “configuration” 的内容...
13.11. 惯例优先原则(convention over configuration) 13.11.1. 对控制器的支持:ControllerClassNameHandlerMapping 13.11.2. 对模型的支持:ModelMap(ModelAndView) 13.11.3. 对视图的支持:...
13.11. 惯例优先原则(convention over configuration) 13.11.1. 对控制器的支持:ControllerClassNameHandlerMapping 13.11.2. 对模型的支持:ModelMap(ModelAndView) 13.11.3. 对视图的支持:...