欢迎来到天天文库
浏览记录
ID:34723326
大小:127.18 KB
页数:7页
时间:2019-03-10
《ibatis框架搭建顺序及个人心得》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、初步学习搭建ibaits框架,及学习心得!整体测试项目框架图准备工作:导入所需的jar包1.ibatis.jar2.sqljdbc.jar放在WEB-INf-lib目下第一步:构建jdbc.Properties;打开开始编辑jdbc.Driver=com.microsoft.sqlserver.jdbc.SQLServerDriverjdbc.ConnectionURL=jdbc:sqlserver://localhost:1433;DataBaseName=SalesOfClothingjdbc.Username=sajdbc.Password=1234第二步:构建SqlMa
2、pConfig.xml学习心得:创建的SqlMapconfig.xml时,默认为下图所示没有下面这段话所以构建SqlMapConfig时,一定要手动复制上面的代码,不然会报错!报错提示如下:下面开始编辑SqlMapConfig.xml文件
3、MapConfigPUBLIC"-//ibatis.apache.org//DTDSQLMapConfig2.0//EN""http://ibatis.apache.org/dtd/sql-map-config-2.dtd">4、maxSessions="10"maxTransactions="5"useStatementNamespaces="true"/>6、taSourcetype="SIMPLE">7、ource="com/system/haohao/mapping/User.xml"/>第三步:构建你自己想要测试的表。User.xml是为了设置别名!方便使用
4、maxSessions="10"maxTransactions="5"useStatementNamespaces="true"/>6、taSourcetype="SIMPLE">7、ource="com/system/haohao/mapping/User.xml"/>
6、taSourcetype="SIMPLE">7、ource="com/system/haohao/mapping/User.xml"/>
7、ource="com/system/haohao/mapping/User.xml"/>
此文档下载收益归作者所有