使用spring jdbc时 事务配置文件
<?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.0.xsd"><bean id="dataSource" destroy-method="close"><property name="driverClassName"><value>com.mysql.jdbc.Driver</value></property><property name="url"><value>jdbc:mysql://localhost:3306/votedb?useUnicode=true&characterEncoding=utf-8</value></property><property name="username"><value>root</value></property><property name="password"><value>123456</value></property><property name="maxActive"><value>1000</value></property><property name="maxIdle"><value>50</value></property><property name="maxWait"><value>50</value></property><property name="defaultAutoCommit"><value>false</value></property></bean><bean id="jdbcTransactionManager"/></property></bean><bean id="jdbcTransProxy" ref="jdbcTransactionManager" /><property name="transactionAttributes"><props><prop key="add*">PROPAGATION_REQUIRED</prop><prop key="save*">PROPAGATION_REQUIRED</prop><prop key="update*">PROPAGATION_REQUIRED</prop><prop key="remove*">PROPAGATION_REQUIRED</prop><prop key="get*">PROPAGATION_REQUIRED,readOnly</prop></props></property></bean> </beans>