spring+ibatis配置文件
来源:互联网 发布:java多线程题目 编辑:程序博客网 时间:2024/06/05 12:48
<?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.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"></property>
<property name="url" value="jdbc:sqlserver://127.0.0.1:1433;databaseName=mydb"></property>
<property name="username" value="sa"></property>
<property name="password" value=""></property>
</bean>
<!-- sqlMapClient -->
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<property name="configLocation" value="file:src/ibatis.xml"></property>
</bean>
<!-- aop -->
<bean id="deptDOAImpl" class="com.t3.dao.impl.DeptDAOImpl">
<property name="sqlMapClient" ref="sqlMapClient"></property>
</bean>
<bean id="deptServeceImpl" class="com.t3.biz.impl.DeptServiceImpl">
<property name="ideptDAO" ref="deptDOAImpl"></property>
</bean>
<!-- 事务管理器 --><!-- ioc -->
<bean id="ibatisManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"></property>
</bean>
<!-- 事务拦截器 -->
<bean id="trInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="ibatisManager"></property>
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
<!-- 自动代理 -->
<bean id="autoProxy" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="beanNames">
<list>
<value>*DAOImpl</value>
</list>
</property>
<property name="interceptorNames">
<list>
<value>trInterceptor</value>
</list>
</property>
</bean>
</beans>
- :ibatis in Spring配置文件
- spring+ibatis配置文件
- struts2+ibatis+spring整合配置文件
- spring + ibatis 配置文件浅析 之 web.xml
- spring整合ibatis步骤及配置文件
- spring + ibatis 配置文件浅析之 applicationContext-ibatis.xml
- ibatis 配置文件
- ibatis配置文件
- ibatis 配置文件
- Ibatis配置文件
- Spring+ibatis
- ibatis+spring
- spring+ibatis
- spring ibatis
- Spring+ibatis
- spring+ibatis
- spring+ibatis
- ibatis 配置文件详解
- SSH连接配置文件
- 关于职别考试与能力提升
- 关于Java读取xml文件
- 是该到了为Visual C++开发技术做个盘点的时候了!
- Java编程那些事儿110——网络编程小结
- spring+ibatis配置文件
- MYSQL Replication优化总结
- JSP页面跳转的方法总结
- 检讨
- spring+hibernate配置文件
- LINUX删除文章的前几行
- 杰诺在线(垂直搜索引擎研发)
- vc++中_RecordsetPtr使用
- UpdatePanel的使用