- 浏览: 178744 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (140)
- java (138)
- 佳能500d (1)
- 佳能 (1)
- Oracle数据库文档构造器--Oraschemadoc (1)
- EJB调用的原理分析 (1)
- 使用css3画"静音"icon (1)
- 张小庆,在路上(16)-给弟弟找工作 (1)
- Android短信编解码方式 (1)
- lua web 开发 (1)
- zk安装 (1)
- 菜单多国语言化遇到的问题 (1)
- 【转】纯文本配置还是注册表 (1)
- C++ delete删除动态分配的内存 (1)
- eclipse下修改项目名导致tomcat内发布名不一致的解决方法 (1)
- Lucene实现各种常见文档的全文检索 (1)
- 项目风险之人员流动风险 (1)
- 时空数据模型简介 (1)
- XSLT学习笔记 (1)
- 依然是计划 如果没有计划似乎就没有了动力 (1)
- How to Succeed in A Professional Career (1)
- 编程环境应该和讨论社区完美的进行结合 (1)
- C#坦克大战实现 (1)
- 电脑用户密码忘记了怎么办? (1)
- java.lang.NoClassDefFoundError: org/dom4j/DocumentException (1)
- 关于成立北京Android爱好者俱乐部的声明 (1)
- Android开发之初探音频的播放 (1)
- Struts标签循环List (1)
- CAP原理 (1)
- javabean的自动生成 (1)
- 打开CMD一闪就关的解决方案 (1)
- 我是项目经理,我的项目管理日记【20111202】 (1)
- Html5游戏开发入门笔记--<躲砖块> (1)
- mysql中查看和设置系统字符编码 (1)
- PhoneGap-Accelerometer (1)
- [Jetty]Jetty工作原理 (1)
- Ibatis+Spring整合实例Demo+源码 (1)
最新评论
-
u012985907:
dsdsdsdsd
FLASH上传与拍照 -头像-avatart -
a379933101:
?????????????????????????????
android listview 连续调用 getview问题分析及解决 -
151tmac:
拜托下次粘贴的时候,粘贴为纯文本
android listview 连续调用 getview问题分析及解决 -
liudezhong135:
...
Spring3MVC 在JSP中使用@ModelAttribute -
香飘飘2011:
要是不知道层次级别,如何退回到根目录呢
FTP退回到根目录
<span style="color: #ff0000;">1. 单独整合ibatis</span>
ibatis和hibernate一样, 总体上没有hibernate那么强大.但是ibatis简单易用.
区别:
hibernate中每个实体类配置的注解和xml对应于数据库,ORM关系看比较紧;查询更新以实体对象为基准;
ibatis中每个实体也配置xml和实体类(entity和数据库对应的字段);配置要用的SQL语句;
?
<span style="color: #ff0000;">A. 见证实体对象User.java</span>
package cn.edu.zju.jjh.entity; import java.io.Serializable; /**** * * @author greatwqs * @date 2011-12-02 */ public class User implements Serializable { private static final long serialVersionUID = 1L; private String id; private String name; private String password; private String description; // getter and setter }
?
<span style="color: #ff0000;">B. 对应实体的ibatis的xml配置信息.Users.xml</span>
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <sqlMap namespace="User"> <!-- Use type aliases to avoid typing the full classname every time. --> <typeAlias alias="User" type="cn.edu.zju.jjh.entity.User" /> <!-- Result maps describe the mapping between the columns returned from a query, and the class properties. A result map isn't necessary if the columns (or aliases) match to the properties exactly. --> <resultMap id="UserResult" class="User"> <result property="id" column="id" /> <result property="name" column="name" /> <result property="password" column="password" /> <result property="description" column="description" /> </resultMap> <!-- Select with no parameters using the result map for Account class. --> <select id="selectAllUsers" resultMap="UserResult"> select * from Users </select> <!-- A simpler select example without the result map. Note the aliases to match the properties of the target result class. --> <select id="selectUserById" parameterClass="String" resultClass="User"> select id as id, name as name, password as password, description as description from Users where id = #id# </select> <!-- Insert example, using the Account parameter class --> <insert id="insertUser" parameterClass="User"> insert into Users (id,name, password,description) values ( #id#, #name#, #password#, #description#) </insert> <!-- Update example, using the Account parameter class --> <update id="updateAccount" parameterClass="User"> update Users set name = #name#, password = #password#, description = #description# where id = #id# </update> <!-- Delete example, using an integer as the parameter class --> <delete id="deleteUserById" parameterClass="String"> delete from Users where id = #id# </delete> </sqlMap>
?
?
主要是数据库字段和实体字段的对应和常用SQL的配置.
?
<span style="color: #ff0000;">C. ibatis总的配置文件 SqlMapConfig.xml</span>
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-config-2.dtd"> <sqlMapConfig> <!-- Configure a built-in transaction manager. If you're using an app server, you probably want to use its transaction manager and a managed datasource --> <transactionManager type="JDBC" commitRequired="false"> <dataSource type="SIMPLE"> <property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/> <property name="JDBC.ConnectionURL" value="jdbc:mysql://localhost:3306/ibatistest"/> <property name="JDBC.Username" value="root"/> <property name="JDBC.Password" value="greatwqs"/> </dataSource> </transactionManager> <!-- List the SQL Map XML files. They can be loaded from the classpath, as they are here (com.domain.data...) --> <sqlMap resource="cn/edu/zju/jjh/entity/Users.xml"/> <!-- List more here... <sqlMap resource="com/mydomain/data/Order.xml"/> <sqlMap resource="com/mydomain/data/Documents.xml"/> --> </sqlMapConfig>
?
<span style="color: #ff0000;">D: 测试IbatisTest.java</span>
package cn.edu.zju.jjh; import java.io.IOException; import java.io.Reader; import java.sql.SQLException; import cn.edu.zju.jjh.entity.User; import com.ibatis.common.resources.Resources; import com.ibatis.sqlmap.client.SqlMapClient; import com.ibatis.sqlmap.client.SqlMapClientBuilder; public class IbatisTest { /*** * 使用纯Ibatis进行测试! */ public static void main(String[] args) { String resource = "sqlMapConfig_ibatis.xml"; Reader reader; SqlMapClient sqlMap = null; try { reader = Resources.getResourceAsReader(resource); sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader); sqlMap.startTransaction(); User user = new User(); user.setId("1099"); user.setName("EagleWang"); user.setPassword("EaglePassword"); user.setDescription("Email: greatwqs@163.com"); sqlMap.insert("insertUser", user); sqlMap.commitTransaction(); sqlMap.endTransaction(); } catch (IOException e) { e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } } }
?
执行测试成功:
DEBUG-Created connection 1073282. DEBUG-{conn-100000} Connection DEBUG-{conn-100000} Preparing Statement: insert into Users (id,name, password,description) values ( ?, ?, ?, ?) DEBUG-{pstm-100001} Executing Statement: insert into Users (id,name, password,description) values ( ?, ?, ?, ?) DEBUG-{pstm-100001} Parameters: [1099, EagleWang, EaglePassword, Email: greatwqs@163.com] DEBUG-{pstm-100001} Types: [java.lang.String, java.lang.String, java.lang.String, java.lang.String] DEBUG-Returned connection 1073282 to pool.
<span style="color: #ff0000;">?</span>
<span style="color: #ff0000;">2. Spring整合Ibatis</span>
通过上面的配置测试成功,证明ibatis能独立测试成功!
A. Spring配置如下:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <!-- 配置数据源,这里配置在Spring中,就不需要在ibatis中配置数据源了 --> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName"> <value>com.mysql.jdbc.Driver</value> </property> <property name="url"> <value>jdbc:mysql://localhost:3306/ibatistest</value> </property> <property name="username"> <value>root</value> </property> <property name="password"> <value>greatwqs</value> </property> </bean> <!-- spring对ibatis配置文件读取的实现,指定ibatis配置文件的目录,配置文件只需放置有哪些实体的xml所在位置 --> <bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"> <property name="configLocation"> <value>SqlMapConfig_spring.xml</value> </property> </bean> <!-- Spring配置事务,ref = 数据源 --> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource"> <ref local="dataSource" /> </property> </bean> <!-- 与hibernate相似,如果需要建立DAO层,传入链接数据源+ibatis特有的sqlMapClient,而在DAO中要继承类SqlMapClientDaoSupport,hibernate中是HibernateDaoSupport --> <bean id="userDao" class="cn.edu.zju.jjh.dao.UserDaoImpl"> <property name="dataSource"> <ref local="dataSource" /> </property> <property name="sqlMapClient"> <ref local="sqlMapClient" /> </property> </bean> <!-- userDaoProxy为一个userDao的形式,中间加入事务的支持,在action中UserDaoInterface userDao = (UserDaoInterface) springContex.getBean("userDaoProxy"); --> <bean id="userDaoProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> <property name="transactionManager"> <ref bean="transactionManager" /> </property> <property name="target"> <ref local="userDao" /> </property> <property name="transactionAttributes"> <props> <prop key="insert*">PROPAGATION_REQUIRED</prop> <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop> </props> </property> </bean> </beans>
?
B. SqlMapConfig_spring.xml只需配置:(与上面1.C中的配置文件做比较)
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-config-2.dtd"> <sqlMapConfig> <!-- List the SQL Map XML files. They can be loaded from the classpath, as they are here (com.domain.data...) --> <sqlMap resource="cn/edu/zju/jjh/entity/Users.xml" /> <!-- List more here... <sqlMap resource="com/mydomain/data/Order.xml"/> <sqlMap resource="com/mydomain/data/Documents.xml"/> --> </sqlMapConfig>
?C. Spring+ibatis集成测试代码
package cn.edu.zju.jjh; import org.springframework.context.support.ClassPathXmlApplicationContext; import cn.edu.zju.jjh.dao.UserDaoInterface; import cn.edu.zju.jjh.entity.User; public class SpringTest { public static void main(String arg[]){ ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml"); UserDaoInterface userDao = (UserDaoInterface) ac.getBean("userDaoProxy"); try { User user = new User(); user.setId("20001"); user.setName("greatwqs"); user.setPassword("GreatPassword"); user.setDescription("Email: greatwqs@126.com"); userDao.insertUser(user); } catch (Exception e) { e.printStackTrace(); } } }
?
?
成功测试:
INFO-Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@10dd1f7: display name [org.springframework.context.support.ClassPathXmlApplicationContext@10dd1f7]; startup date [Fri Dec 02 18:27:03 CST 2011]; root of context hierarchy DEBUG-Class [org.apache.commons.collections.map.CaseInsensitiveMap] or one of its dependencies is not present: java.lang.ClassNotFoundException: org.apache.commons.collections.map.CaseInsensitiveMap DEBUG-Class [edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap] or one of its dependencies is not present: java.lang.ClassNotFoundException: edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap INFO-Loading XML bean definitions from class path resource [applicationContext.xml] DEBUG-Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl] DEBUG-Found beans DTD [http://www.springframework.org/dtd/spring-beans.dtd] in classpath: spring-beans.dtd DEBUG-Loading bean definitions DEBUG-Loaded 5 bean definitions from location pattern [applicationContext.xml] INFO-Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@10dd1f7]: org.springframework.beans.factory.support.DefaultListableBeanFactory@ecd7e DEBUG-5 beans defined in org.springframework.context.support.ClassPathXmlApplicationContext@10dd1f7: display name [org.springframework.context.support.ClassPathXmlApplicationContext@10dd1f7]; startup date [Fri Dec 02 18:27:03 CST 2011]; root of context hierarchy DEBUG-Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@8b819f] DEBUG-Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@789144] INFO-Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@ecd7e: defining beans [dataSource,sqlMapClient,transactionManager,userDao,userDaoProxy]; root of factory hierarchy DEBUG-Creating shared instance of singleton bean 'dataSource' DEBUG-Creating instance of bean 'dataSource' DEBUG-Eagerly caching bean 'dataSource' to allow for resolving potential circular references DEBUG-Finished creating instance of bean 'dataSource' DEBUG-Creating shared instance of singleton bean 'sqlMapClient' DEBUG-Creating instance of bean 'sqlMapClient' DEBUG-Eagerly caching bean 'sqlMapClient' to allow for resolving potential circular references DEBUG-Invoking afterPropertiesSet() on bean with name 'sqlMapClient' DEBUG-Finished creating instance of bean 'sqlMapClient' DEBUG-Creating shared instance of singleton bean 'transactionManager' DEBUG-Creating instance of bean 'transactionManager' DEBUG-Eagerly caching bean 'transactionManager' to allow for resolving potential circular references DEBUG-Returning cached instance of singleton bean 'dataSource' DEBUG-Invoking afterPropertiesSet() on bean with name 'transactionManager' DEBUG-Finished creating instance of bean 'transactionManager' DEBUG-Creating shared instance of singleton bean 'userDao' DEBUG-Creating instance of bean 'userDao' DEBUG-Eagerly caching bean 'userDao' to allow for resolving potential circular references DEBUG-Returning cached instance of singleton bean 'dataSource' DEBUG-Returning cached instance of singleton bean 'sqlMapClient' DEBUG-Invoking afterPropertiesSet() on bean with name 'userDao' DEBUG-Finished creating instance of bean 'userDao' DEBUG-Creating shared instance of singleton bean 'userDaoProxy' DEBUG-Creating instance of bean 'userDaoProxy' DEBUG-Eagerly caching bean 'userDaoProxy' to allow for resolving potential circular references DEBUG-Returning cached instance of singleton bean 'transactionManager' DEBUG-Returning cached instance of singleton bean 'userDao' DEBUG-Adding transactional method [insert*] with attribute [PROPAGATION_REQUIRED,ISOLATION_DEFAULT] DEBUG-Adding transactional method [get*] with attribute [PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly] DEBUG-Invoking afterPropertiesSet() on bean with name 'userDaoProxy' DEBUG-Creating JDK dynamic proxy: target source is SingletonTargetSource for target object [cn.edu.zju.jjh.dao.UserDaoImpl@12cc95d] DEBUG-Finished creating instance of bean 'userDaoProxy' DEBUG-Publishing event in context [org.springframework.context.support.ClassPathXmlApplicationContext@10dd1f7]: org.springframework.context.event.ContextRefreshedEvent[source=org.springframework.context.support.ClassPathXmlApplicationContext@10dd1f7: display name [org.springframework.context.support.ClassPathXmlApplicationContext@10dd1f7]; startup date [Fri Dec 02 18:27:03 CST 2011]; root of context hierarchy] DEBUG-Returning cached instance of singleton bean 'userDaoProxy' DEBUG-Using transaction object [org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSourceTransactionObject@15fadcf] DEBUG-Creating new transaction with name [cn.edu.zju.jjh.dao.UserDaoInterface.insertUser]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT DEBUG-Acquired Connection [jdbc:mysql://localhost:3306/ibatistest, UserName=root@localhost, MySQL-AB JDBC Driver] for JDBC transaction DEBUG-Switching JDBC Connection [jdbc:mysql://localhost:3306/ibatistest, UserName=root@localhost, MySQL-AB JDBC Driver] to manual commit DEBUG-Bound value [org.springframework.jdbc.datasource.ConnectionHolder@f4f44a] for key [org.apache.commons.dbcp.BasicDataSource@b23210] to thread [main] DEBUG-Initializing transaction synchronization DEBUG-Opened SqlMapSession [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl@1ec8909] for iBATIS operation DEBUG-Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@f4f44a] for key [org.apache.commons.dbcp.BasicDataSource@b23210] bound to thread [main] DEBUG-{conn-100000} Connection DEBUG-Obtained JDBC Connection [jdbc:mysql://localhost:3306/ibatistest, UserName=root@localhost, MySQL-AB JDBC Driver] for iBATIS operation DEBUG-{conn-100000} Preparing Statement: insert into Users (id,name, password,description) values ( ?, ?, ?, ?) DEBUG-{pstm-100001} Executing Statement: insert into Users (id,name, password,description) values ( ?, ?, ?, ?) DEBUG-{pstm-100001} Parameters: [20001, greatwqs, GreatPassword, Email: greatwqs@126.com] DEBUG-{pstm-100001} Types: [java.lang.String, java.lang.String, java.lang.String, java.lang.String] DEBUG-Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@f4f44a] for key [org.apache.commons.dbcp.BasicDataSource@b23210] bound to thread [main] DEBUG-Triggering beforeCommit synchronization DEBUG-Triggering beforeCompletion synchronization DEBUG-Initiating transaction commit DEBUG-Committing JDBC transaction on Connection [jdbc:mysql://localhost:3306/ibatistest, UserName=root@localhost, MySQL-AB JDBC Driver] DEBUG-Triggering afterCommit synchronization DEBUG-Triggering afterCompletion synchronization DEBUG-Clearing transaction synchronization DEBUG-Removed value [org.springframework.jdbc.datasource.ConnectionHolder@f4f44a] for key [org.apache.commons.dbcp.BasicDataSource@b23210] from thread [main] DEBUG-Releasing JDBC Connection [jdbc:mysql://localhost:3306/ibatistest, UserName=root@localhost, MySQL-AB JDBC Driver] after transaction DEBUG-Returning JDBC Connection to DataSource
?
classpath:
?
<?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING25_CORE"/> <classpathentry kind="con" path="melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING25_AOP"/> <classpathentry kind="con" path="melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING25_PERSISTENCE_CORE"/> <classpathentry kind="con" path="melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING25_PERSISTENCE_IBATIS"/> <classpathentry kind="con" path="melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING25_PERSISTENCE_JDBC"/> <classpathentry kind="con" path="melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING25_PERSISTENCE_JDO"/> <classpathentry kind="lib" path="lib/ibatis-common-2.jar"/> <classpathentry kind="lib" path="lib/ibatis-dao-2.jar"/> <classpathentry kind="lib" path="lib/ibatis-sqlmap-2.jar"/> <classpathentry kind="lib" path="lib/log4j-1.2.9.jar"/> <classpathentry kind="lib" path="lib/mysql-connector-java-3.1.12-bin.jar"/> <classpathentry kind="var" path="MYECLIPSE_SPRING_DATA_HOME/1.2/lib/spring-aop.jar"/> <classpathentry kind="output" path="bin"/> </classpath>
?
两个测试程序在一起.
附上源码+lib+建表SQL:
?
- FirstIbatisDemo.zip (1.1 MB)
- 下载次数: 32
发表评论
-
[Jetty]Jetty工作原理
2012-02-07 17:29 1009http://www.ibm.com/develo ... -
PhoneGap-Accelerometer
2012-02-07 14:23 1228采集设备在x、y、z方向上的动作。 acce ... -
mysql中查看和设置系统字符编码
2012-02-04 14:28 1732--查看数据库的字符集 show variables ... -
Html5游戏开发入门笔记--<躲砖块>
2012-02-03 12:04 1186学习了html5中的canvas画布元素,自己写了一个 ... -
我是项目经理,我的项目管理日记【20111202】
2012-02-03 10:19 1016其实前段时间项目 ... -
打开CMD一闪就关的解决方案
2012-02-02 12:14 1418转:http://blog.163.com/cumt_ ... -
javabean的自动生成
2012-02-02 11:59 1430在jcreator pro中自动生成 在j ... -
CAP原理
2012-02-01 09:00 1180作者:NinGoo 原文链接:ht ... -
Struts标签循环List
2012-01-31 14:18 985<pre name="code&quo ... -
Android开发之初探音频的播放
2012-01-11 16:29 1136<h1>Android开发之初探音频的播放 ... -
关于成立北京Android爱好者俱乐部的声明
2012-01-11 14:33 886<blockquote dir="lt ... -
java.lang.NoClassDefFoundError: org/dom4j/DocumentException
2011-12-28 13:03 15156<span style="font-f ... -
电脑用户密码忘记了怎么办?
2011-12-28 12:14 1006<span style="fon ... -
C#坦克大战实现
2011-12-20 13:29 1146记得在大学学java ... -
编程环境应该和讨论社区完美的进行结合
2011-12-19 11:54 787在学习.NET过程中,经常会遇到很多问题,有的时候会找 ... -
How to Succeed in A Professional Career
2011-12-19 10:29 764(From Microsoft)<br>& ... -
依然是计划 如果没有计划似乎就没有了动力
2011-12-15 10:39 898</span></span>& ... -
XSLT学习笔记
2011-12-14 14:04 691<p class="MsoNorma ... -
时空数据模型简介
2011-12-14 13:59 1510<p class="MsoNo ... -
项目风险之人员流动风险
2011-12-13 12:29 1212<p class="MsoNorma ...
相关推荐
Struts2+iBATIS+Spring整合是Java Web开发中一种常见的技术栈组合,这三种框架协同工作,可以构建出高效、灵活的企业级应用。Struts2作为MVC(Model-View-Controller)架构的一部分,主要负责处理HTTP请求,管理前端...
本实例关注的是“ibatis+Spring+struts2”的整合,这是一个经典的Java Web开发组合,用于实现数据访问、业务逻辑控制和用户界面交互。下面我们将深入探讨这三个组件及其整合的关键知识点。 1. **iBATIS**:iBATIS...
内容包里面是源代码,运行该例子的方式就是,使用里面的sql...使用cmd进入该解压包,运行 java -jar *.jar ibatis2spring.jar 就可以了。欲了解代码的详细,请访问作者博客,搜索《ibatis + Spring 多表查询》文章。
Struts1(2)+Spring+Ibatis+jQuery是一个经典的Java Web开发框架组合,它们各自在Web应用的不同层面上发挥着关键作用。这个整合实例旨在展示如何将这四个技术有效地结合在一起,创建一个高效、可维护的Web应用程序...
compass+ibatis+spring+struts2整合开发compass+ibatis+spring+struts2整合开发compass+ibatis+spring+struts2整合开发compass+ibatis+spring+struts2整合开发
这个"struts1+ibatis+Spring demo"是一个示例项目,展示了如何将这三个框架集成到一起,实现一个完整的Web应用。 Struts1是Apache组织开发的一个开源MVC框架,它主要负责控制应用程序的流程,通过Action类处理用户...
"ibatis+spring+struts2 整合开发例子"就是一个典型的Java Web应用集成开发案例,旨在帮助开发者理解和掌握这三大框架的协同工作原理。接下来,我们将详细讨论这三个组件以及它们的整合过程。 Ibatis是一个轻量级的...
"Struts2+Spring+Ibatis+MySQL" 是一个经典的Java Web开发框架组合,用于构建高效、可扩展的企业级应用程序。这个组合集成了强大的MVC(Model-View-Controller)框架Struts2、依赖注入与面向切面编程的Spring框架、...
struts2+ibatis+spring+Hessian 整合项目 web项目整合,服务端用hessian协议远程调用服务端的方法,hessian是用spring代理整合,struts2+ibatis+spring的整合项目,用作学习和开发基础平台构建很有用处,工程导入...
"Ibatis+Spring整合"是指将这两个框架集成到同一个项目中,以利用它们的优势互补,实现更高效、更灵活的数据访问层。下面我们将详细探讨这个整合过程中的关键知识点。 首先,集成Ibatis和Spring的第一步是引入相关...
struts2+hibernate+spring+ibatis 小实例struts2+hibernate+spring+ibatis 小实例struts2+hibernate+spring+ibatis 小实例struts2+hibernate+spring+ibatis 小实例struts2+hibernate+spring+ibatis 小实例struts2+...
Struts、iBATIS和Spring是Java开发中常用的三大框架,它们各自负责不同的职责,而将它们整合在一起,可以构建出高效、灵活的企业级应用程序。本文将深入探讨这三者的核心概念、整合过程以及实际应用。 **Struts** ...
Struts2-Ibatis+spring.rar Struts2-Ibatis+spring.rar Struts2-Ibatis+spring.rar Struts2-Ibatis+spring.rar Struts2-Ibatis+spring.rar
5. **整合iBatis与Spring**:通过Spring的SqlSessionFactoryBean,配置数据源和MyBatis的配置文件,将DAO接口与Mapper XML关联起来。 6. **部署与测试**:将所有配置文件、类库和应用代码打包成WAR文件,部署到应用...
struts2+ibatis+spring框架整合
【标题】:Ibatis+Spring+Struts1框架搭建 在Web开发中,Ibatis、Spring和Struts1是三个非常重要的组件,它们分别负责不同的职责。Ibatis是一个优秀的持久层框架,Spring是一个全面的后端应用框架,而Struts1则是一...
oa_权限系统ibatis+spring+struts2 oa_权限系统ibatis+spring+struts2 oa_权限系统ibatis+spring+struts2