Spring mvc中的Roolback和commit如何使用JdbcTemplate
jdbc.xml中
<tx:annotation-driven transaction-manager="transactionManager"/>
<beans:bean id="ds"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<beans:property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<beans:property name="url"
value="jdbc:oracle:thin:@localhost:1521:db12c" />
<beans:property name="username" value="phutran" />
<beans:property name="password" value="Phut0107" />
</beans:bean>
<beans:bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<beans:property name="dataSource" ref="ds"></beans:property>
</beans:bean>
<beans:bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<beans:property name="dataSource" ref="ds"/>
</beans:bean>
谁能帮助我,谢谢:(。