4)spring 的 applicationContext.xml
spring 的 applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd"><beans> <!-- 引入参数配置文件 --> <bean id="propertyConfigurer" abstract="true" /> </property> <property name="transactionAttributes"> <props> <prop key="insert*">PROPAGATION_REQUIRED</prop> <prop key="update*">PROPAGATION_REQUIRED</prop> <prop key="delete*">PROPAGATION_REQUIRED</prop> <prop key="*">PROPAGATION_REQUIRED,readOnly</prop> </props> </property> </bean> <!-- ibatis sqlMapClient 配置 --> <bean id="sqlMapClient" > <ref bean="sqlMapClient"/> </property> </bean> <!-- 添加了事务的管理类 --> <bean id="ibatis_BookManager" parent="baseTransactionProxy"> <property name="target"> <bean class="com.spring.demo.manager.Ibatis_BookManager"> <property name="dao"> <ref bean="ibatis_BookDao"/> </property> </bean> </property> </bean> </beans>