<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="username" value="root"/>
<property name="password" value="1234"/>
<property name="url" value="jdbc:mysql://localhost:3306/orclight"/>
</bean>
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>SqlMapConfig.xml</value>
</property>
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="sqlMapClientTemplate" class="org.springframework.orm.ibatis.SqlMapClientTemplate">
<property name="sqlMapClient" ref="sqlMapClient"/>
</bean>
</beans>
备注:连接的数据库是mysql数据库
分享到:
相关推荐
ibatis和spring 综合的配置文件
Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in URL [file:/E:/cloudwave-core/src/main/webapp/WEB- INF/classes/...
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean" p:dataSource-ref="dataSourceProxy"> <value>classpath:SqlMapConfig.xml</value> </property> ...
2.4.1. 在XML里更为简单的声明性事务配置 2.4.2. JPA 2.4.3. 异步的JMS 2.4.4. JDBC 2.5. Web层 2.5.1. Spring MVC的表单标签库 2.5.2. Spring MVC合理的默认值 2.5.3. Portlet 框架 2.6. 其他特性 2.6.1. 动态语言...
2.4.1. 在XML里更为简单的声明性事务配置 2.4.2. JPA 2.4.3. 异步的JMS 2.4.4. JDBC 2.5. Web层 2.5.1. Spring MVC的表单标签库 2.5.2. Spring MVC合理的默认值 2.5.3. Portlet 框架 2.6. 其他特性 2.6.1. ...
2.4.1. 在XML里更为简单的声明性事务配置 2.4.2. JPA 2.4.3. 异步的JMS 2.4.4. JDBC 2.5. Web层 2.5.1. Spring MVC的表单标签库 2.5.2. Spring MVC合理的默认值 2.5.3. Portlet 框架 2.6. 其他特性 2.6.1. ...
(再加一条,其实大家可以看官方的教程更好些:http://mybatis.github.io/mybatis-3/,而且如果英文不是很好的那就看中文的:http://mybatis.github.io/mybatis-3/zh/sqlmap-xml.html) 写在这个系列前面的话: 以前...
1.1.1 查找并打开prodcut/WebRoot/WEB-INF/spring-context/applicationContext.xml文件。数据库配置引入 的是init.properties,读者也可自行更改。 1.1.2 数据库配置 修改工程中admanager/src/init.properties文件...
2.4.1. 在XML里更为简单的声明性事务配置 2.4.2. 对Websphere 事务管理的完整支持 2.4.3. JPA 2.4.4. 异步的JMS 2.4.5. JDBC 2.5. Web层 2.5.1. Spring MVC合理的默认值 2.5.2. Portlet 框架 2.5.3. 基于...
2.4.1. 在XML里更为简单的声明性事务配置 2.4.2. 对Websphere 事务管理的完整支持 2.4.3. JPA 2.4.4. 异步的JMS 2.4.5. JDBC 2.5. Web层 2.5.1. Spring MVC合理的默认值 2.5.2. Portlet 框架 2.5.3. 基于...
spring-oxm.jar:Spring对于object/xml映射的支持,可以让JAVA与XML之间来回切换 spring-messaging.jar: spring-test.jar:对JUNIT等测试框架的简单封装 spring-tx.jar:为JDBC、Hibernate、JDO、JPA等提供的一致的...
这是自己整合的Spring 3.0+Struts2+Mybatis 3 + p6spy +ehcache的平台框架,内含一点示例代码,目前ehcache没有使用。直接编译后发布就能用 测试环境基于JDK1.6+Tomcat 6.0. 大家拿到后请根据实际情况修改 ...
1.1.1 查找并打开prodcut/WebRoot/WEB-INF/spring-context/applicationContext.xml文件。数据库配置引入 的是init.properties,读者也可自行更改。 1.1.2 数据库配置 修改工程中admanager/src/init.properties文件...
注意:工程采用MyEclipse5.1+tomcat5.5 。...4.记住要修改ApplicationContext-common.xml中的数据库用户名和密码:) 5.如果还有问题,讨论Q_群:62150370(群1) 76202406(群2) 91986229(群3) 一起讨论
使用struts2(json-plugin) + spring2 + ibatis2 + extjs2.2 + mysql5.0架构开发的图书管理系统,对学习struts2,json-plugin,spring2,ibatis2, ...* 部署时,注意修改相应的数据源配置applicationContext-common.xml
Spring 出品的 JdbcTemplate 对于不想使用hibernate或者ibatis那样需要大量学习成本而且还想获得对象化的人来说是很好用的。但是 JdbcTemplate还是有很多不足之处或者说是缺点。比如你没法像hibernate那样直接传一个...
它进入web.xml,发现自己需要经历struts2这个过滤器,于是在这个过滤器里,应用把工作交给了struts,在struts配置中找到getDesc这个控制器, <result name="xmlMessage" type="plaintext"> 在struts内部,这...