課程
/后端開發(fā)
/Java
/Spring事務(wù)管理
能不能給份代碼啊 老師
2016-04-22
源自:Spring事務(wù)管理 3-5
正在回答
<?xml?version="1.0"?encoding="UTF-8"?> <beans?xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"?xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"?xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans? http://www.springframework.org/schema/beans/spring-beans-3.2.xsd? http://www.springframework.org/schema/tx? http://www.springframework.org/schema/tx/spring-tx-3.2.xsd? http://www.springframework.org/schema/aop? http://www.springframework.org/schema/aop/spring-aop-3.2.xsd? http://www.springframework.org/schema/context? http://www.springframework.org/schema/context/spring-context-3.2.xsd?"> <!--?引入屬性文件?--> <context:property-placeholder?location="classpath:db.properties"?/> <!--?配置c3p0連接池?--> <bean?id="dataSource"?class="com.mchange.v2.c3p0.ComboPooledDataSource"> <property?name="driverClass"?value="${core.driverClassName}"?/> <property?name="jdbcUrl"?value="${core.url}"?/> <property?name="user"?value="${core.username}"?/> <property?name="password"?value="${core.password}"?/> </bean> <!--?配置業(yè)務(wù)層?--> <bean?id="accountService"?class="com.spring.demo3.AccountServiceImpl"> <property?name="accountDao"?ref="accountDao"?/> </bean> <!--?配置dao層?--> <bean?id="accountDao"?class="com.spring.demo3.AccountDaoImpl"> <property?name="dataSource"?ref="dataSource"?/> </bean> <!--?配置事務(wù)管理器?--> <bean?id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property?name="dataSource"?ref="dataSource"?/> </bean> <!--?開啟注解事務(wù)?--> <tx:annotation-driven?transaction-manager="transactionManager"/> </beans>
舉報
事務(wù)管理是Spring重要的知識,應(yīng)用事務(wù)解決數(shù)據(jù)不一致問題
1 回答誰有這份api文檔
2 回答代碼中200d,字母d代表什么啊?
1 回答求spring的jar包的源代碼
2 回答第四章的代碼運(yùn)行錯誤
2 回答有沒有視屏中的代碼呢
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2016-08-25